本文整理汇总了C#中System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ObjectDataSourceSelectingEventArgs类的具体用法?C# ObjectDataSourceSelectingEventArgs怎么用?C# ObjectDataSourceSelectingEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectDataSourceSelectingEventArgs类属于System.Web.UI.WebControls命名空间,在下文中一共展示了ObjectDataSourceSelectingEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: objectDataSource_Selecting
protected void objectDataSource_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
e.InputParameters["totalCount"] = LastQueryRowCount;
if (e.ExecutingSelectCount == false)
{
string where = e.InputParameters["where"] as string;
if (MostSupervisor == false || NormalSupervisior == false)
{
//检查是否具有分类授权
WfApplicationAuthCollection authInfo = WfApplicationAuthAdapter.Instance.GetUserApplicationAuthInfo(DeluxeIdentity.Current.User);
var builder = authInfo.GetApplicationAndProgramBuilder("APPLICATION_NAME", "PROGRAM_NAME");
if (builder.IsEmpty == false)
{
if (string.IsNullOrEmpty(where) == false)
where += " AND ";
where += "(" + builder.ToSqlString(TSqlBuilder.Instance) + ")";
e.InputParameters["where"] = where;
}
else
{
e.Cancel = true; //没有定义任何权限,不能查询
}
}
}
}
示例2: dsMain_Selecting
protected void dsMain_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
if (e.ExecutingSelectCount == false)
{
e.InputParameters["where"] = BuildWhereCondition();
}
}
示例3: ObjectDataSource1_Selecting
protected void ObjectDataSource1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
if (!IsPostBack)
{
e.Cancel = true;
}
}
示例4: odsItems_Selecting
protected void odsItems_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
e.InputParameters["langCode"] = this.CurrentLanguage;
e.InputParameters["pageID"] = this.PageID;
e.InputParameters["count"] = this.NewsCount;
e.InputParameters["skipMain"] = this.SkipMain;
}
示例5: dsDinamicaCriptografia_Selecting
protected void dsDinamicaCriptografia_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
if (drlMensaje.SelectedValue == "-1" || drlGrupoMensaje.SelectedValue == "-1")
{
e.Cancel = true;
}
}
示例6: dataSourceMain_Selecting
protected void dataSourceMain_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
WhereSqlClauseBuilder where = new WhereSqlClauseBuilder();
where.AppendItem("TASK_GUID", Request.QueryString["id"]);
dataSourceMain.Condition = where;
}
示例7: ObjectDataSourceUnreadComments_Selecting
protected void ObjectDataSourceUnreadComments_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
if (UserContext.Current != null)
{
e.InputParameters["DepartmentGuid"] = UserContext.Current.SelectedInstance.InstanceId;
}
}
示例8: dsBooks_Selecting
protected void dsBooks_Selecting( object sender, ObjectDataSourceSelectingEventArgs e )
{
e.InputParameters[ "fromYear" ] = Convert.ToInt32( tbxFromPublishingYear.Text );
if( string.IsNullOrEmpty( tbxToPublishingYear.Text ) )
e.InputParameters[ "toYear" ] = DateTime.Now.Year;
else
e.InputParameters[ "toYear" ] = Convert.ToInt32( tbxToPublishingYear.Text );
List<int> selectedThemes = new List<int>();
foreach( ListItem item in cblThemes.Items )
{
if( item.Selected )
selectedThemes.Add( Convert.ToInt32( item.Value ) );
}
e.InputParameters[ "themes" ] = selectedThemes.ToArray();
if( rblLanguages.SelectedIndex == 0 )
e.InputParameters[ "language" ] = null;
else
e.InputParameters[ "language" ] = rblLanguages.SelectedValue;
if( ddlOffices.SelectedIndex == 0 )
e.InputParameters[ "officeID" ] = -1;
else
e.InputParameters[ "officeID" ] = Convert.ToInt32( ddlOffices.SelectedValue );
}
示例9: ObjectDataSourceDoNotEmailList_Selecting
protected void ObjectDataSourceDoNotEmailList_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
if (UserContext.Current != null)
{
e.InputParameters["InstanceId"] = UserContext.Current.SelectedInstance.InstanceId;
}
}
示例10: ObjSolicitudesT_Selecting
protected void ObjSolicitudesT_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
classFiltro f = new classFiltro();
f.VIG_SOL = Convert.ToInt16(Request.Cookies["sircc_vig"].Value);
if (chkDepDel.Checked)
{
f.DEP_PSOL = CboDepDel.SelectedValue;
}
if (chkObj.Checked)
{
f.OBJ_SOL = txtObj.Text.ToUpper();
}
if (chkFecha.Checked) {
f.TIPO_FECHA =(classFiltro.TipoFecha)cboTipoFecha.SelectedIndex;
f.FECHA_I = Convert.ToDateTime(txtFechaIni.Text);
f.FECHA_F = Convert.ToDateTime(txtFechaFin.Text);
}
if (chkFuncionario.Checked) {
f.ID_ABOG_ENC = CboEncargados.SelectedValue;
}
if (chkCodSol.Checked) {
f.COD_SOL = TxtCodSol.Text;
}
e.InputParameters["Filtro"] = f;
}
示例11: ObjectDataSourceProduct_Selecting
protected void ObjectDataSourceProduct_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
if (!e.ExecutingSelectCount)
{
e.Arguments.StartRowIndex = this.AspNetPager1.StartRecordIndex;
e.Arguments.MaximumRows = this.AspNetPager1.PageSize;
}
}
示例12: odsConsumation_Selecting
protected void odsConsumation_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
if (Request.QueryString["Id"] != null)
{
//Set the input parameter Id of the GetItemById method to the Id in the query string
e.InputParameters["Id"] = Request.QueryString["Id"];
}
}
示例13: ObjectDataSourceRequest_Selecting
protected void ObjectDataSourceRequest_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
if (UserContext.Current != null)
{
e.InputParameters["DepartmentGuid"] = UserContext.Current.SelectedInstance.InstanceId;
e.InputParameters["Type"] = ArticleType.Request.ToString();
}
}
示例14: MailLogDataSource_Selecting
protected void MailLogDataSource_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
if (!IsAdmin)
{
Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
e.InputParameters["LocationId"] = dv[0]["LocationId"];
}
}
示例15: odsCities_Selecting
protected void odsCities_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
{
int region = (int)e.InputParameters["regionID"];
if (region == 0)
{
e.Cancel = true;
}
e.InputParameters["language"] = this.CurrentLanguage;
}