protected void Page_Load(object sender, EventArgs e) { Page.Form.Attributes.Add("enctype", "multipart/form-data"); ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; idRiesgo = objUtilidades.descifrarCadena(Request.QueryString["id"]); IdSucursal = objUtilidades.descifrarCadena(Request.QueryString["suc"]); List <sucursal> ListaSucursal = new List <sucursal>(); ListaSucursal = Mgr_Sucursal.Get_Sucursal(Convert.ToInt32(IdSucursal), 0, ""); foreach (var item in ListaSucursal) { IdEmpresa = Convert.ToInt32(item.id_empresa); } medida = objUtilidades.descifrarCadena2(Request.QueryString["med"]); lbAnho.Text = DateTime.Now.Year.ToString(); if (!IsPostBack) { CargarDatos(); CargarListas(); } }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; hdfSucursal.Value = "" + IdSucursal; BoolEmpSuc = Mgr_Empresa.Get_Empresa_Sucursal(ObjUsuario); phAgregar.Visible = BoolEmpSuc.Item2; phEmpresa.Visible = BoolEmpSuc.Item1; phEmpresaAdd.Visible = BoolEmpSuc.Item1; phEmpresaEdit.Visible = BoolEmpSuc.Item1; phSucursalAdd.Visible = BoolEmpSuc.Item2; phSucursalEdit.Visible = BoolEmpSuc.Item2; phSucursal.Visible = BoolEmpSuc.Item2; phRol.Visible = BoolEmpSuc.Item2; if (ObjUsuario.isAdm_Sucursal()) { phAgregar.Visible = true; } if (!IsPostBack) { LlenarGridView(); CargarListas(); } }
protected void Page_Load(object sender, EventArgs e) { Page.Form.Attributes.Add("enctype", "multipart/form-data"); ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; BoolEmpSuc = Mgr_Empresa.Get_Empresa_Sucursal(ObjUsuario); phAgregar.Visible = BoolEmpSuc.Item2; phEmpresa.Visible = BoolEmpSuc.Item1; phEmpresaAdd.Visible = BoolEmpSuc.Item1; phEmpresaEdit.Visible = BoolEmpSuc.Item1; phSucursal.Visible = BoolEmpSuc.Item2; phSucursalAdd.Visible = BoolEmpSuc.Item2; phSucursalEdit.Visible = BoolEmpSuc.Item2; if (!IsPostBack) { ListaAnho(ddlYear); CargarListas(); ViewState["anho"] = string.Empty + Convert.ToInt32(DateTime.Now.Year); } }
public static bool Delete_AutoEvaluacion(String idAutoEvaluacion, Model_UsuarioSistema ObjUsuario) { int idAuto = Convert.ToInt32(idAutoEvaluacion); int idSucursal = 0; GrupoLiEntities contexto = new GrupoLiEntities(); List <documento> ListaDocumento = new List <documento>(); ListaDocumento = contexto.documento.Where(b => b.id_documento == idAuto).ToList(); foreach (var item in ListaDocumento) { idSucursal = Convert.ToInt32(item.id_tabla); } documento tabla = new documento(); ObjUsuario.Error = CRUD.Delete_Fila(tabla, idAuto); if (ObjUsuario.Error) { contexto = new GrupoLiEntities(); lista_actividad Edit = contexto.lista_actividad.SingleOrDefault(b => b.id_sucursal == idSucursal); if (Edit != null) { Edit.estatus = "No"; } ObjUsuario.Error = CRUD.Edit_Fila(contexto); } return(ObjUsuario.Error); }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; if (!IsPostBack) { //ObjUsuario.objModeloBD.CargarListado(ddlEmpresas, "Empresa", ObjUsuario.Id_empresa); } if (Request.QueryString["id"] == null) { Modal.MostrarMsjModal("No se ha recibido ningun identificador válido", "ERR", this); } else { id = Request.QueryString["id"]; cargardatos(id); } if (ObjUsuario.isAdm_Grupoli()) { phEmpresa.Visible = true; } else { phEmpresa.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; BoolEmpSuc = Mgr_Empresa.Get_Empresa_Sucursal(ObjUsuario); phEmpresa.Visible = BoolEmpSuc.Item1; phSucursal.Visible = BoolEmpSuc.Item2; if (!IsPostBack) { if (BoolEmpSuc.Item1) { Mgr_Empresa.Lista_Empresa(ddlEmpresa); } else if (BoolEmpSuc.Item2) { Mgr_Sucursal.Lista_Sucursal(ddlSucursal, ObjUsuario.Id_empresa); } else { cargarPlan(); } } }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; BoolEmpSuc = Mgr_Empresa.Get_Empresa_Sucursal(ObjUsuario); phAgregar.Visible = BoolEmpSuc.Item2; phEmpresa.Visible = BoolEmpSuc.Item1; phEmpresaEdit.Visible = BoolEmpSuc.Item1; phSucursal1.Visible = BoolEmpSuc.Item2; phSucursal2.Visible = !BoolEmpSuc.Item2; if (!IsPostBack) { if (ObjUsuario.isAdm_Sucursal()) { phAgregar.Visible = true; CargarListas(); LlenarGridView(); ConsultarSucursal(ObjUsuario.Id_sucursal); } else if (!BoolEmpSuc.Item2) { ConsultarSucursal(ObjUsuario.Id_sucursal); } else { CargarListas(); LlenarGridView(); } } }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; BoolEmpSuc = Mgr_Empresa.Get_Empresa_Sucursal(ObjUsuario); phEmpresa.Visible = BoolEmpSuc.Item1; phSucursal.Visible = BoolEmpSuc.Item2; if (!IsPostBack) { ddlYear = ListaAnho(ddlYear); CargarListas(); } else { foreach (var ctlID in Page.Request.Form.AllKeys) { if (ctlID != null) { Control c = Page.FindControl(ctlID) as Control; if (c is DropDownList) { if (c.ClientID.Contains("btnGenerar")) { cargarInformacion(); } } } } } }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); BoolEmpSuc = Mgr_Empresa.Get_Empresa_Sucursal(ObjUsuario); List <documento> ListaDocumento = new List <documento>(); List <trabajador> ListTrabajador = new List <trabajador>(); int Anho = DateTime.Now.Year; string valor = Convert.ToString(Request.QueryString["date"]); if (valor != null) { ViewState["FechaAlarma"] = Convert.ToDateTime(Request.QueryString["date"]); } else { ViewState["FechaAlarma"] = string.Empty + DateTime.Now.ToShortDateString(); } AlarmasDia(); }
protected void Page_Load(object sender, EventArgs e) { Page.Form.Attributes.Add("enctype", "multipart/form-data"); ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; if (!IsPostBack) { CargarAsistencia(); } else { foreach (var ctlID in Page.Request.Form.AllKeys) { if (ctlID != null) { Control c = Page.FindControl(ctlID) as Control; if (c is Button) { if (c.ClientID.Contains("btPrintSave")) { CargarAsistencia(); } } } } } }
protected void Page_Load(object sender, EventArgs e) { Model_UsuarioAutenticado _autenticado = new Model_UsuarioAutenticado(fIdentity); System.Web.HttpBrowserCapabilities browser = Request.Browser; string Navegador = browser.Type.Substring(0, 6); ObjUsuario = Model_UsuarioAutenticado.ValidarObjUsuario(_autenticado); List <usuario> objUsuario = new List <usuario>(); objUsuario = Mgr_Usuario.Get_Usuario(ObjUsuario.Id_usuario); foreach (var itemUsuario in objUsuario) { lbNombreUsuario.Text = itemUsuario.login; if (itemUsuario.trabajador != null && itemUsuario.trabajador.foto != "") { imgLogo.ImageUrl = itemUsuario.trabajador.foto; } else { imgLogo.ImageUrl = "~/archivos/foto_perfil/usuario.png"; } } if (ObjUsuario.isRolDiferente()) { menuPrin.Visible = false; if (Utilidades.VerificarUsuario(ObjUsuario.Rol, Request.Url.AbsoluteUri)) { Response.Redirect("~/source/sistema/MenuPrincipal/index.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { Page.Form.Attributes.Add("enctype", "multipart/form-data"); ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; BoolEmpSuc = Mgr_Empresa.Get_Empresa_Sucursal(ObjUsuario); phEmpresa.Visible = BoolEmpSuc.Item1; phEmpAdd.Visible = BoolEmpSuc.Item1; phEmpEdit.Visible = BoolEmpSuc.Item1; phSucursal.Visible = BoolEmpSuc.Item2; phSucAdd.Visible = BoolEmpSuc.Item2; phSucEdit.Visible = BoolEmpSuc.Item2; phUsuAdd.Visible = true; phUsuEdit.Visible = true; if (!IsPostBack) { CargarListas(); LlenarGridView(); } }
protected void Page_Load(object sender, EventArgs e) { Page.Form.Attributes.Add("enctype", "multipart/form-data"); ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; BoolEmpSuc = Mgr_Empresa.Get_Empresa_Sucursal(ObjUsuario); phEmpresa.Visible = BoolEmpSuc.Item1; phSucursal.Visible = BoolEmpSuc.Item2; if (!IsPostBack) { CargarListas(); } else { foreach (var ctlID in Page.Request.Form.AllKeys) { if (ctlID != null) { Control c = Page.FindControl(ctlID) as Control; if (c is DropDownList) { if (c.ClientID.Contains("ddlPuesto")) { crearTabla(); } } } } } }
protected void Page_Load(object sender, EventArgs e) { Page.Form.Attributes.Add("enctype", "multipart/form-data"); ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; BoolEmpSuc = Mgr_Empresa.Get_Empresa_Sucursal(ObjUsuario); phEmpresa.Visible = BoolEmpSuc.Item1; phSucursal.Visible = BoolEmpSuc.Item2; DateTime fechaActual = DateTime.Now; ViewState["FechaInicio"] = fechaActual.ToString("dd-MM-yyy"); ViewState["FechaFin"] = fechaActual.AddMonths(1).ToString("dd-MM-yyy"); if (!IsPostBack) { txtFechaInicio.Text = fechaActual.ToString("yyyy-MM-dd"); txtFechaFin.Text = fechaActual.AddMonths(1).ToString("yyyy-MM-dd"); ViewState["responsable"] = "0"; ViewState["Categoria"] = "0"; LlenarGridView(); CargarListas(); } }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; BoolEmpSuc = Mgr_Empresa.Get_Empresa_Sucursal(ObjUsuario); phAgregar.Visible = BoolEmpSuc.Item2; phEmpresa.Visible = BoolEmpSuc.Item1; phSucursal.Visible = BoolEmpSuc.Item2; if (ObjUsuario.isAdm_Sucursal()) { phAgregar.Visible = true; } if (!IsPostBack) { ViewState["area"] = "0"; CargarListas(); LlenarGridView(); if (Request.QueryString["eu"] == "1") { Modal.MostrarAlertaEdit(phAlerta, divAlerta, lbAlerta, ObjUsuario.Error, txtBuscar); } } }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); idGestion = objUtilidades.descifrarCadena(Request.QueryString["id"]); CargarGestion(); }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; if (!IsPostBack) { Mgr_Gobierno.Get_CNO(ddlCargo); } }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); if (!IsPostBack) { CargarUsuario(); } }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); if (!IsPostBack) { CargarListas(); Tab1.CssClass = "Clicked"; MainView.ActiveViewIndex = 0; } }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); if (!IsPostBack) { ddlYear = ListaAnho(ddlYear); cargarPolitica(); } }
protected void Page_Load(object sender, EventArgs e) { Page.Form.Attributes.Add("enctype", "multipart/form-data"); ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); if (!IsPostBack) { LlenarGridView(); } }
protected void Page_Load(object sender, EventArgs e) { Page.Form.Attributes.Add("enctype", "multipart/form-data"); ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); idAccidente = objUtilidades.descifrarCadena(Request.QueryString["id"]); CargarData(); }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; BoolEmpSuc = Mgr_Empresa.Get_Empresa_Sucursal(ObjUsuario); if (!IsPostBack) { cargarDatos(); } }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; IDPerfil = Convert.ToInt32(objUtilidades.descifrarCadena(Request.QueryString["id"])); if (!IsPostBack) { Mgr_Gobierno.Get_CNO(ddlCargo); CargarPerfil(); } }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); BoolEmpSuc = Mgr_Empresa.Get_Empresa_Sucursal(ObjUsuario); if (!IsPostBack) { CargarListas(); CargarControles(); } }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; BoolEmpSuc = Mgr_Empresa.Get_Empresa_Sucursal(ObjUsuario); phEmpresa.Visible = BoolEmpSuc.Item1; phSucursal.Visible = BoolEmpSuc.Item2; if (!IsPostBack) { ViewState["contador"] = "2"; CargarListas(); } else { foreach (var ctlID in Page.Request.Form.AllKeys) { if (ctlID != null) { Control c = Page.FindControl(ctlID) as Control; if (c is Button || c is ImageButton) { if (c.ClientID.Contains("btnAgregarFila")) { //collapse3.Attributes.Add("class", "panel-collapse collapse in"); crearCampos(Convert.ToInt32(ViewState["contador"])); } if (c.ClientID.Contains("btnCalculate")) { //collapse3.Attributes.Add("class", "panel-collapse collapse in"); int valor = Convert.ToInt32(ViewState["contador"]) - 1; ViewState["contador"] = string.Empty + valor; crearCampos(Convert.ToInt32(ViewState["contador"])); } if (c.ClientID.Contains("btnGuardar")) { int valor = Convert.ToInt32(ViewState["contador"]) - 1; ViewState["contador"] = string.Empty + valor; crearCampos(Convert.ToInt32(ViewState["contador"])); } if (c.ClientID.Contains("btnPrint")) { int valor = Convert.ToInt32(ViewState["contador"]) - 1; ViewState["contador"] = string.Empty + valor; crearCampos(Convert.ToInt32(ViewState["contador"])); } } } } } }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; idRiesgo = objUtilidades.descifrarCadena(Request.QueryString["id"]); IdSucursal = objUtilidades.descifrarCadena(Request.QueryString["suc"]); Page.Form.Attributes.Add("enctype", "multipart/form-data"); if (!IsPostBack) { CargarDatos(); } }
protected void Page_Load(object sender, EventArgs e) { Page.Form.Attributes.Add("enctype", "multipart/form-data"); ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); if (!IsPostBack) { Mgr_CodigoCiiu.List_Codciiu_Div_item(ddlSeccion1, "SeccionCiiu"); Mgr_Gobierno.Get_Reg_Dpto_Mcpio(ddlRegion, "Region"); Mgr_Gobierno.Get_ARL(ddlArp); } }
protected void Page_Load(object sender, EventArgs e) { Page.Form.Attributes.Add("enctype", "multipart/form-data"); ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); BoolEmpSuc = Mgr_Empresa.Get_Empresa_Sucursal(ObjUsuario); if (!IsPostBack) { cargarDatos(); } }
protected void Page_Load(object sender, EventArgs e) { ObjUsuario = Utilidades.ValidarSesion(HttpContext.Current.User.Identity as FormsIdentity, this); phAlerta.Visible = false; idPerfil = objUtilidades.descifrarCadena(Request.QueryString["id"]); if (!IsPostBack) { Mgr_Gobierno.Get_EPS(ddlEps); Mgr_Gobierno.Get_AFP(ddlFondo); CargarUsuario(); } }