public void GetCustomer() { try { var pResult = ""; var ds = _objCustomer.GetCustomer(Session["connectionString"].ToString(), ref pResult); if (pResult == "") { ASPxGridView1.DataSource = ds; var regionCombo = (ASPxGridView1.Columns["NAME_ROUTE"] as GridViewDataComboBoxColumn); if (regionCombo != null) { regionCombo.PropertiesComboBox.DataSource = ds.Tables[0].DefaultView.ToTable(true, "NAME_ROUTE"); regionCombo.PropertiesComboBox.ValueField = "NAME_ROUTE"; regionCombo.PropertiesComboBox.TextField = "NAME_ROUTE"; } var regionCombo2 = (ASPxGridView1.Columns["NAME_CLASSIFICATION"] as GridViewDataComboBoxColumn); if (regionCombo2 != null) { regionCombo2.PropertiesComboBox.DataSource = ds.Tables[0].DefaultView.ToTable(true, "NAME_CLASSIFICATION"); regionCombo2.PropertiesComboBox.ValueField = "NAME_CLASSIFICATION"; regionCombo2.PropertiesComboBox.TextField = "NAME_CLASSIFICATION"; } ASPxGridView1.DataBind(); Session["DsDatos"] = ds; } else { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }
public void GetCustomers() { try { var pResult = ""; var ds = _objCustomer.GetCustomer(Session["connectionString"].ToString(), ref pResult); if (pResult == "") { ASPxGridView3.DataSource = ds; ASPxGridView3.DataBind(); Session["ALL_CUSTOMERS_AR"] = ds; } else { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }