public void GetUserRole() { var pResult = ""; var ds = _objClassification.GetClassification(Session["connectionString"].ToString(), "USER_ROLE", ref pResult); if (pResult == "") { CmbUserRole.DataSource = ds; CmbUserRole.ValueField = "NAME_CLASSIFICATION"; CmbUserRole.TextField = "VALUE_TEXT_CLASSIFICATION"; CmbUserRole.DataBind(); Session["DS_USER_ROLE"] = ds; } else { ScriptManager.RegisterStartupScript(this, GetType(), "ErrorText", "CallError('" + pResult + "');", 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(); } }