Ejemplo n.º 1
0
        protected void OrderDs_Selecting(object sender, System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs e)
        {
            // ADD IN THE SEARCH CRITERIA
            OrderFilter filter = GetOrderFilter();

            e.InputParameters["filter"] = filter;
        }
        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; //没有定义任何权限,不能查询
                    }
                }
            }
        }
Ejemplo n.º 3
0
 protected void ObjectDataSourceUnreadComments_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     if (UserContext.Current != null)
     {
         e.InputParameters["DepartmentGuid"] = UserContext.Current.SelectedInstance.InstanceId;
     }
 }
Ejemplo n.º 4
0
 protected void dsMain_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     if (e.ExecutingSelectCount == false)
     {
         e.InputParameters["where"] = BuildWhereCondition();
     }
 }
Ejemplo n.º 5
0
 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;
 }
Ejemplo n.º 6
0
        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 );
        }
        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;
        }
 protected void dsDinamicaCriptografia_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     if (drlMensaje.SelectedValue == "-1" || drlGrupoMensaje.SelectedValue == "-1")
     {
         e.Cancel = true;
     }
 }
Ejemplo n.º 9
0
 protected void ObjectDataSourceDoNotEmailList_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     if (UserContext.Current != null)
     {
         e.InputParameters["InstanceId"] = UserContext.Current.SelectedInstance.InstanceId;
     }
 }
Ejemplo n.º 10
0
        protected void OrderDs_Selecting(object sender, System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs e)
        {
            // ADD IN THE SEARCH CRITERIA
            ShipStationExportOptions options = GetExportOptions();

            e.InputParameters["exportOptions"] = options;
        }
		protected void dataSourceMain_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
		{
			WhereSqlClauseBuilder where = new WhereSqlClauseBuilder();
			where.AppendItem("TASK_GUID", Request.QueryString["id"]);

			dataSourceMain.Condition = where;
		}
 protected void ObjectDataSource1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     if (!IsPostBack)
     {
         e.Cancel = true;
     }
 }
Ejemplo n.º 13
0
 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();
     }
 }
Ejemplo n.º 14
0
 protected void ObjectDataSourceProduct_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     if (!e.ExecutingSelectCount)
     {
         e.Arguments.StartRowIndex = this.AspNetPager1.StartRecordIndex;
         e.Arguments.MaximumRows = this.AspNetPager1.PageSize;
     }
 }
Ejemplo n.º 15
0
 protected void ObjectDataSource1_Selecting(object sender, System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs e)
 {
     if (e.ExecutingSelectCount)
     {
         e.InputParameters["rowCount"]         = HttpContext.Current.Items["RowCount"];
         HttpContext.Current.Items["RowCount"] = null;
     }
 }
Ejemplo n.º 16
0
 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"];
     }
 }
Ejemplo n.º 17
0
 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;
 }
Ejemplo n.º 18
0
		protected void dataSourceMain_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
		{
			if (this.IsPostBack == false && this.Request["id"] != null)
			{
				WhereSqlClauseBuilder builder = new WhereSqlClauseBuilder();
				builder.AppendItem("SynchronizeID", this.Request["id"]);
				this.dataSourceMain.Condition = builder;
			}
		}
Ejemplo n.º 19
0
 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"];
     }
 }
Ejemplo n.º 20
0
 protected void ObjectDataSource1_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     e.InputParameters["userName"] = UserName_tbx.Text;
     //var business = new Bussiness.PlayerBussiness();
     //var player = business.GetUserSingleByNickName(UserName_tbx.Text);
     //if (player == null)
     //{
     //     error_lbl.Text="Username is not exits or not active ,Change to Acive it";
     //}
 }
Ejemplo n.º 21
0
		protected void dataSourceMain_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
		{
			WhereSqlClauseBuilder builder = ConditionMapping.GetWhereSqlClauseBuilder(this.Condition);

			string cate = Request.QueryString["category"];
			if (string.IsNullOrEmpty(cate) == false)
				builder.AppendItem("CATEGORY", cate);

			this.dataSourceMain.Condition = builder;
		}
Ejemplo n.º 22
0
 protected void CityPerDiemDataSource_Selecting(object sender, System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs e)
 {
     if (!string.IsNullOrEmpty(BillingAccountDropDown.SelectedValue))
     {
         if (e.InputParameters["AccountId"] == null)
         {
             e.InputParameters["AccountId"] = BillingAccountDropDown.SelectedValue;
         }
     }
 }
 protected void dsTransformacion_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     if (Page.IsPostBack)
     {
         if (refrescarGrilla == false)
         {
             e.Cancel = true;
         }
     }
 }
Ejemplo n.º 24
0
 protected void odsCenters_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     if (regionID == -1)
     {
         e.Cancel = true;
     }
     e.InputParameters["specializationID"] = specializationID;
     e.InputParameters["regionID"] = regionID;
     e.InputParameters["cityID"] = cityID;
     e.InputParameters["language"] = this.CurrentLanguage;
 }
Ejemplo n.º 25
0
        protected void TimesheetCityRateDataSource_Selecting(object sender, System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs e)
        {
            if (TimesheetId <= 0)
            {
                return;
            }

            if (e.InputParameters["TimesheetId"] == null)
            {
                e.InputParameters["TimesheetId"] = TimesheetId;
            }
        }
Ejemplo n.º 26
0
        protected void BillingCityRateDataSource_Selecting(object sender, System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs e)
        {
            if (PeriodAccountId <= 0)
            {
                return;
            }

            if (e.InputParameters["PeriodAccountId"] == null)
            {
                e.InputParameters["PeriodAccountId"] = PeriodAccountId;
            }
        }
Ejemplo n.º 27
0
 protected void ObjectDataSourceSearch_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     e.InputParameters["DepartmentGuid"] = this.InstanceGuid;
     string searchText = string.Empty;
     if (this.SearchText.Length > 0)
     {
         foreach (string str in this.SearchText.Split(new char[] { ' ' }))
             searchText += string.Format("FORMSOF(INFLECTIONAL,\"{0}\") AND ", str);
         if (searchText.Length > 5) searchText = searchText.Substring(0, searchText.Length - 5);
     }
     else searchText = "\"\"";
     e.InputParameters["SearchingText"] = searchText;
 }
        protected void odsItems_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            e.InputParameters["langCode"] = this.CurrentLanguage;

            if (PageID > 0)
            {
                e.InputParameters["pageID"] = this.PageID;
            }
            else
            {
                e.InputParameters["sectionID"] = this.SectionID;
            }
        }
 /// <summary>
 /// Resumes the data selecting.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The
 /// <see cref="System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs"/>
 /// instance containing the event data.</param>
 protected void ResumeDataSelecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     var strategy = ResumeService.SearchStrategy(Request.QueryString["selection"]);
     int min;
     int max;
     int.TryParse(Request.QueryString["min"], out min);
     int.TryParse(Request.QueryString["max"], out max);
     e.InputParameters["value"] = Request.QueryString["search"];
     e.InputParameters["searchStrategy"] = strategy;
     e.InputParameters["startAge"] = min;
     e.InputParameters["endAge"] = max;
     e.InputParameters["sortExpression"] = Request.QueryString["exp"];
     e.InputParameters["sortDirection"] = Request.QueryString["dir"];
 }
Ejemplo n.º 30
0
        protected void getTwentyDates(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            DateTime dat =(DateTime) e.InputParameters["dat"];

            IList<DateTime> li = new List<DateTime>();
            int i= 0;
            while (i < 20)
            {
                li.Add(dat);
                dat=dat.AddDays(1);

            }

            //return li;
        }
Ejemplo n.º 31
0
        protected void ObjDtConsCont_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            BLL.Filtros.vContratosIntFiltro vc = new BLL.Filtros.vContratosIntFiltro();
            if (ChkTipo.Checked)
            {
                vc.Cod_Tip = this.cboTipo.SelectedValue;
            }
            if (ChkSTipo.Checked)
            {
                vc.Cod_STip = this.CboSubTipo.SelectedValue;
            }

            if (ChkVigencia.Checked) {
                vc.Vigencia = Convert.ToInt16(this.CmbVig.SelectedValue);
            }
            if (ChkEstado.Checked)
            {
                vc.Estado = CmbEst.SelectedValue;
            }
            vc.FilxFS = ChkFecha.Checked;
            if (vc.FilxFS)
            {
                vc.FS_Inicial = Convert.ToDateTime(this.TxtFecIni.Text);
                vc.FS_Final = Convert.ToDateTime(this.TxtFecFin.Text);
            }
            if (this.ChkNContrato.Checked)
            {
                vc.Numero = TxtNroCto.Text;
            }
            if (ChkContratista.Checked)
            {
                vc.Ide_Contratista = this.TxtIdeCon.Text;
            }
            if (this.ChkSup.Checked)
            {
                vc.Ide_Interventor = this.TxtIdeSup.Text;
            }
            if (this.ChkDepNec.Checked)
            {
                vc.Dep_Nec = CmbDep.SelectedValue;
            }
            if (this.ChkObj.Checked)
            {
                vc.Objeto = this.TxtObjCont.Text;
            }
            e.InputParameters["cFil"] = vc;
        }
Ejemplo n.º 32
0
 protected void RolDS_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     try
     {
         if (!this.IsPostBack)
         {
             COCASJOL.LOGIC.Configuracion.ConfiguracionDeSistemaLogic configLogic = new COCASJOL.LOGIC.Configuracion.ConfiguracionDeSistemaLogic(this.docConfiguracion);
             if (configLogic.VentanasCargarDatos == true)
                 e.Cancel = false;
             else
                 e.Cancel = true;
         }
     }
     catch (Exception ex)
     {
         log.Fatal("Error fatal al cargar roles.", ex);
         throw;
     }
 }
Ejemplo n.º 33
0
        protected void odsCompanies_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            var htCompany = new Hashtable();
            htCompany.Add("CNPJ", txtCnpj.Text);
            htCompany.Add("Email", txtEmail.Text);
            htCompany.Add("CompanyName", txtCompanyName.Text);

            htCompany.Add("sortExpression", "LastActivityDate");

            htCompany.Add("sortDirection", "desc");

            htCompany.Add("FantasyName", String.Empty);
            htCompany.Add("IE", String.Empty);
            htCompany.Add("StartDate", null);

            htCompany.Add("Phone", String.Empty);
            htCompany.Add("Website", String.Empty);

            e.InputParameters["htCompany"] = htCompany;
        }
Ejemplo n.º 34
0
 protected void EducationTrainingObjectDataSource_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     if (DateFromTextBox.Text != "" && DateToTextBox.Text != "")
     {
         DateTime dt;
         if (DateTime.TryParseExact(DateFromTextBox.Text, "dd.MM.yyyy", null, System.Globalization.DateTimeStyles.None, out dt))
         {
             e.InputParameters["dateFrom"] = dt;
         }
         if (DateTime.TryParseExact(DateToTextBox.Text, "dd.MM.yyyy", null, System.Globalization.DateTimeStyles.None, out dt))
         {
             e.InputParameters["dateTo"] = dt;
         }
     }
     else
     {
         DateFromTextBox.Text = "";
         DateToTextBox.Text = "";
     }
 }
Ejemplo n.º 35
0
        protected void ObjProcesosT_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            /*e.InputParameters["Vigencia"] =Convert.ToInt16(Request.Cookies["sircc_vig"].Value);
               e.InputParameters["Dep_Del"] = CboDepDel.SelectedValue;
            */

            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_FECHAP = (classFiltro.TipoFechap)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 (chkNumPro.Checked)
            {
                f.NUM_PRO = TxtNumPro.Text;
            }

            e.InputParameters["Filtro"] = f;
        }
Ejemplo n.º 36
0
		protected void dataSourceMain_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
		{
			//if (this.AdvanceSearchEnabled)
			{
				var condition = this.CurrentAdvancedSearchCondition;

				WhereSqlClauseBuilder builder = ConditionMapping.GetWhereSqlClauseBuilder(condition);

				if (this.IsPostBack == false && this.Request.QueryString["id"] != null)
				{
					builder.AppendItem("ID", this.Request.QueryString["id"]);
				}

				this.dataSourceMain.Condition = new ConnectiveSqlClauseCollection(builder, this.DeluxeSearch.GetCondition());
			}
			//else
			//{
			//    this.dataSourceMain.Condition = this.DeluxeSearch.GetCondition();
			//}
		}
 protected void ObjectDataSource1_Selecting(object sender, System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs e)
 {
     e.InputParameters["country"] = Country;
 }
Ejemplo n.º 38
0
        protected void DataSourceSelecting(object sender, System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs e)
        {
            e.InputParameters["filterExpression"] = MessagesGrid.MasterTableView.FilterExpression;

            //rcbStatus.SelectedIndex = 2;
        }
 protected void PaymentsDs_Selecting(object sender, System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs e)
 {
     // ADD IN THE SEARCH CRITERIA
     e.InputParameters["filter"] = GetPaymentsFilter();
 }
 protected void OrderNotesDs_Selecting(object sender, System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs e)
 {
     // ADD IN THE SEARCH CRITERIA
     e.InputParameters["filter"]       = GetOrderNotesFilter();
     OrderNotesGrid.Columns[5].Visible = (SearchScope.SelectedIndex > 1);
 }