public void GetProvider() { try { var objProvider = new WSProvider.SwiftExpressWSProvider(); var pResult = ""; var ds = objProvider.GetProvider(Session["connectionString"].ToString(), ref pResult); if (pResult == "") { var regionCombo = (ASPxGridView1.Columns["NAME_PROVIDER"] as GridViewDataComboBoxColumn); if (regionCombo != null) { regionCombo.PropertiesComboBox.DataSource = ds.Tables[0].DefaultView.ToTable(true, "NAME_PROVIDER"); regionCombo.PropertiesComboBox.ValueField = "NAME_PROVIDER"; regionCombo.PropertiesComboBox.TextField = "NAME_PROVIDER"; } ASPxComboBox2.DataSource = ds; ASPxComboBox2.ValueField = "PROVIDER"; ASPxComboBox2.TextField = "NAME_PROVIDER"; ASPxComboBox2.DataBind(); Session["dsProviderSKU"] = ds; } else { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true); } objProvider.Dispose(); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }
public void GetOperator(string cs) { try { var pResult = ""; var objIncome = new SwiftExpressWSIncome(); var ds = objIncome.GetOperator(cs, ref pResult); if (pResult == "") { if (ds.Tables[0].Rows.Count > 0) { ASPxComboBox2.DataSource = ds; ASPxComboBox2.TextField = "NAME_USER"; ASPxComboBox2.ValueField = "CORRELATIVE"; ASPxComboBox2.DataBind(); } } else { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true); } objIncome.Dispose(); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }
public void Fillcombobox() { DataTable cellnamesdt = VSWebBL.ConfiguratorBL.WebsphereCellBL.Ins.Fillcombobox(); ASPxComboBox2.DataSource = cellnamesdt; //ASPxComboBox2.ValueField = "CellName"; //ASPxComboBox2.ValueType = "CompanyName"; ASPxComboBox2.DataBindItems(); }
public void BindData() { List <DepartmentEntity> dept = DB.GetInstance().Fetch <DepartmentEntity>(""); com_DEPT.DataSource = dept; com_DEPT.ValueField = "DEPT_CODE"; com_DEPT.TextField = "DEPT_NAME"; com_DEPT.DataBind(); if (com_DEPT.SelectedItem == null) { return; } string _dept = com_DEPT.SelectedItem.Value.ToString(); List <ProductLineEntity> plines = DB.GetInstance().Fetch <ProductLineEntity>("where pline_code in (select pline_code from REL_DEPT_PLINE where dept_code=@0)", _dept); ASPxComboBox1.DataSource = plines; ASPxComboBox1.TextField = "PLINE_NAME"; ASPxComboBox1.ValueField = "PLINE_CODE"; ASPxComboBox1.DataBind(); if (ASPxComboBox1.SelectedItem == null) { return; } string pline = ASPxComboBox1.SelectedItem.Value.ToString(); List <StationEntity> stations = StationFactory.GetByProductLine(pline); ASPxComboBox2.DataSource = stations; ASPxComboBox2.TextField = "STATION_NAME"; ASPxComboBox2.ValueField = "WORKUNIT_CODE"; ASPxComboBox2.DataBind(); string workunit = ""; if (ASPxComboBox2.SelectedItem != null) { workunit = ASPxComboBox2.SelectedItem.Value.ToString(); } Report_Exp2200 report = new Report_Exp2200(ASPxComboBox1.SelectedItem.Value.ToString(), workunit, ASPxDateEdit1.Date, ASPxDateEdit2.Date); ReportViewer1.Report = report; }
public void GetRoute() { try { var pResult = ""; var ds = _objRoute.GetRoute(Session["connectionString"].ToString(), ref pResult); if (pResult == "") { ASPxComboBox2.DataSource = ds; ASPxComboBox2.ValueField = "CODE_ROUTE"; ASPxComboBox2.TextField = "NAME_ROUTE"; ASPxComboBox2.DataBind(); } else { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }
protected void Page_Load(object sender, EventArgs e) { if (ValidarConexionYUsuarioLogueado(sender)) { try { var reporte = new Report.ReportSKU { DataSource = Session["DSDISEÑO"] }; ASPxDocumentViewer1.Report = reporte; ASPxDocumentViewer1.DataBind(); Connection = Session["connectionString"].ToString(); _user = Session["USER"].ToString(); if (!Page.IsPostBack) { Session["dsUnidadesDeMedida"] = null; Session["DSsku"] = null; GetClassification(); GetFamily(); /* ------- */ GetMeasureUnit(); } if (Session["DSsku"] != null) { ASPxGridView1.DataSource = Session["DSsku"]; ASPxGridView1.DataBind(); } else { GetSku(); GetMeasureUnit(); } if (Session["dsProviderSKU"] != null) { var ds = (DataSet)Session["dsProviderSKU"]; var regionCombo = (ASPxGridView1.Columns["NAME_PROVIDER"] as GridViewDataComboBoxColumn); if (regionCombo != null) { regionCombo.PropertiesComboBox.DataSource = ds.Tables[0].DefaultView.ToTable(true, "NAME_PROVIDER"); regionCombo.PropertiesComboBox.ValueField = "NAME_PROVIDER"; regionCombo.PropertiesComboBox.TextField = "NAME_PROVIDER"; } ASPxComboBox2.DataSource = ds; ASPxComboBox2.ValueField = "PROVIDER"; ASPxComboBox2.TextField = "NAME_PROVIDER"; ASPxComboBox2.DataBind(); } else { GetProvider(); } //--------------------------------------------------------------------------------------------------------------- if (Session["dsCodeFamily"] != null) { var ds = (DataSet)Session["dsCodeFamily"]; ASPxCboFamSKU.DataSource = ds; ASPxCboFamSKU.ValueField = "CODE_FAMILY_SKU"; ASPxCboFamSKU.TextField = "DESCRIPTION_FAMILY_SKU"; ASPxCboFamSKU.DataBind(); } else { GetFamily(); } //--------------------------------------------------------------------------------------------------------------- if (Session["dsUnidadesDeMedida"] != null) { var ds = (DataSet)Session["dsUnidadesDeMedida"]; UiListaUnidadesDeMedida.DataSource = ds; UiListaUnidadesDeMedida.DataBind(); } else { GetPackUnit(); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } } }
protected void ASPxComboBox2_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e) { ASPxComboBox2.DataBind(); }