public void GetWarehouseNotAsign(String login) { try { var pResult = ""; var objWarehousenotasign = new WSWarehouse.SwiftExpressWSWarehouse(); _ds = objWarehousenotasign.GetWarehouseNotAsign(Session["connectionString"].ToString(), login, ref pResult); if (pResult == "") { Session["DS_WAREHOUSE_NOTASIGN"] = _ds; if (_ds.Tables[0].Rows.Count > 0) { LookupWarehouse.DataSource = _ds; LookupWarehouse.DataBind(); } } else { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", true); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('Error en carga inicial: " + ex.Message + "');", true); } }
protected void Page_Load(object sender, EventArgs e) { if (!ValidarConexionYUsuarioLogueado(sender)) { return; } LookupWarehouse.GridView.Width = 300; LookupRoles.GridView.Width = 300; ASPxTextBox5.Enabled = true; ASPxMenu3.Items.FindByName("btnAgregarCliente").Visible = AgregarCliente(); if (!Page.IsPostBack) { GetUsers(); GetUserRole(); GetSellers(); GetWarehouseNotAsign(""); GetWarehousePreSale(); GetAllZones(); //UsuarioSeleccionoUsuario?.Invoke(this,new RutaArgumento{ Data = new Ruta{CODE_ROUTE = "" }, Usuario = new Usuario{ LOGIN = ""}}); return; } Connection = Session["connectionString"].ToString(); if (!Page.IsPostBack) { Session["ACTION"] = "UPDATE"; Session["base64Profile"] = null; } if (Page.IsPostBack) { ReportView(); } if (Session["DS_USER"] != null) { ASPxGridView1.DataSource = Session["DS_USER"]; ASPxGridView1.DataBind(); } else { GetUsers(); } if (Session["DS_USER_ROLE"] != null) { CmbUserRole.DataSource = Session["DS_USER_ROLE"]; CmbUserRole.ValueField = "NAME_CLASSIFICATION"; CmbUserRole.TextField = "VALUE_TEXT_CLASSIFICATION"; CmbUserRole.DataBind(); } else { GetUserRole(); } if (Session["DS_SELLER_USER"] != null) { LookupSeller.DataSource = Session["DS_SELLER_USER"]; LookupSeller.DataBind(); } else { GetSellers(); } if (Session["DS_WAREHOUSE_NOTASIGN"] != null) { LookupWarehouse.DataSource = Session["DS_WAREHOUSE_NOTASIGN"]; LookupWarehouse.DataBind(); } else { if (!Page.IsPostBack) { GetWarehouseNotAsign(""); } } if (Session["DS_WAREHOUSE_PRESALE"] != null) { LookupWarehousePre.DataSource = Session["DS_WAREHOUSE_PRESALE"]; LookupWarehousePre.DataBind(); } else { GetWarehousePreSale(); } if (Session["UiVistaPoligonosDeRuta"] != null) { UiVistaPoligonosDeRuta.DataSource = Session["UiVistaPoligonosDeRuta"]; UiVistaPoligonosDeRuta.DataBind(); } if (Session["ListaRuta"] != null) { UiListaRuta.DataSource = Session["ListaRuta"]; UiListaRuta.DataBind(); } if (Session["UiListaZona"] != null) { UiListaZona.DataSource = Session["UiListaZona"]; UiListaZona.DataBind(); } }