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 GetOperator() { try { var pResult = ""; var ds = _wscalled.GetOperator(_cs, ref pResult); if (pResult == "") { if (ds.Tables[0].Rows.Count <= 0) { return; } GrLookUser.DataSource = ds; GrLookUser.DataBind(); Session["OPERATOR"] = ds; } else { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error: " + ex.Message + "');", true); } }