コード例 #1
0
        protected void ModSeguridad()
        {
            ViewState["VblIngMS"] = 1;
            ViewState["VblModMS"] = 1;
            ViewState["VblEliMS"] = 1;
            ViewState["VblImpMS"] = 1;
            ViewState["VblCE1"]   = 1;
            ViewState["VblCE2"]   = 1;
            ViewState["VblCE3"]   = 1;
            ViewState["VblCE4"]   = 1;
            ClsPermisos ClsP = new ClsPermisos();
            string      VbPC = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName;

            ClsP.Acceder(Session["C77U"].ToString(), "Frm_InfIngenieria.aspx", VbPC);
            if (ClsP.GetAccesoFrm() == 0)
            {
                Response.Redirect("~/Forms/Seguridad/FrmInicio.aspx");
            }
            if (ClsP.GetIngresar() == 0)
            {
                ViewState["VblIngMS"] = 0;
            }
            if (ClsP.GetModificar() == 0)
            {
                ViewState["VblModMS"] = 0;
            }
            if (ClsP.GetConsultar() == 0)
            {
            }
            if (ClsP.GetImprimir() == 0)
            {
                ViewState["VblImpMS"] = 0;
            }
            if (ClsP.GetEliminar() == 0)
            {
                ViewState["VblEliMS"] = 0;
            }
            if (ClsP.GetCE1() == 0)
            {
            }                           //
            if (ClsP.GetCE2() == 0)
            {
            }
            if (ClsP.GetCE3() == 0)
            {
                ViewState["VblCE3"] = 0;
            }
            if (ClsP.GetCE4() == 0)
            {
                ViewState["VblCE4"] = 0;
            }
            if (ClsP.GetCE5() == 0)
            {
            }
            if (ClsP.GetCE6() == 0)
            {
            }
            IdiomaControles();
        }
コード例 #2
0
        protected void ModSeguridad()
        {
            ViewState["VblIngMS"] = 1;
            ViewState["VblModMS"] = 1;
            ViewState["VblEliMS"] = 1;
            ViewState["VblImpMS"] = 1;
            ViewState["VblCE1"]   = 1;
            ViewState["VblCE2"]   = 1;
            ViewState["VblCE3"]   = 1;
            ViewState["VblCE4"]   = 1;
            ViewState["VblCE5"]   = 1;
            ViewState["VblCE6"]   = 1;
            ClsPermisos ClsP = new ClsPermisos();
            string      VbPC = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName;

            ClsP.Acceder(Session["C77U"].ToString(), ViewState["PFileName"].ToString().Trim() + ".aspx", VbPC);
            if (ClsP.GetAccesoFrm() == 0)
            {
                Response.Redirect("~/Forms/Seguridad/FrmInicio.aspx");
            }
            if (ClsP.GetIngresar() == 0)
            {
                ViewState["VblIngMS"] = 0;
            }                                                           // grd.ShowFooter = false;
            if (ClsP.GetModificar() == 0)
            {
                ViewState["VblModMS"] = 0;
            }
            if (ClsP.GetConsultar() == 0)
            {
            }
            if (ClsP.GetImprimir() == 0)
            {
                ViewState["VblImpMS"] = 0;
            }                                                          //
            if (ClsP.GetEliminar() == 0)
            {
                ViewState["VblEliMS"] = 0;
            }
            if (ClsP.GetCE1() == 0)
            {
                ViewState["VblCE1"] = 0;
            }                                                    // Excel
            if (ClsP.GetCE2() == 0)
            {
                ViewState["VblCE2"] = 0;
            }                                                   //VISUALIZAR HIST
            if (ClsP.GetCE3() == 0)
            {
                ViewState["VblCE3"] = 0;
            }                                                   //EDITAR OBSERVA
            if (ClsP.GetCE4() == 0)
            {
                ViewState["VblCE4"] = 0;
            }                                                   // Exportar valores

            IdiomaControles();
        }
コード例 #3
0
        protected void ModSeguridad()
        {
            ViewState["VblIngMS"] = 1;
            ViewState["VblModMS"] = 1;
            ViewState["VblEliMS"] = 1;
            ViewState["VblImpMS"] = 1;
            if (!Session["C77U"].ToString().Trim().Equals("00000082"))
            {
                GrdDatos.ShowFooter = false;
            }

            ClsPermisos ClsP = new ClsPermisos();
            string      VbPC = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName;

            ClsP.Acceder(Session["C77U"].ToString(), ViewState["PFileName"].ToString().Trim() + ".aspx", VbPC);
            if (ClsP.GetAccesoFrm() == 0)
            {
                Response.Redirect("~/Forms/Seguridad/FrmInicio.aspx");
            }
            if (ClsP.GetIngresar() == 0)
            {
                ViewState["VblIngMS"] = 0; GrdDatos.ShowFooter = false;
            }
            if (ClsP.GetModificar() == 0)
            {
                ViewState["VblModMS"] = 0;
            }
            if (ClsP.GetConsultar() == 0)
            {
            }
            if (ClsP.GetImprimir() == 0)
            {
            }
            if (ClsP.GetEliminar() == 0)
            {
                ViewState["VblEliMS"] = 0;
            }
            if (ClsP.GetCE1() == 0)
            {
            }
            if (ClsP.GetCE2() == 0)
            {
            }
            if (ClsP.GetCE3() == 0)
            {
            }
            if (ClsP.GetCE4() == 0)
            {
            }
            if (ClsP.GetCE5() == 0)
            {
            }
            if (ClsP.GetCE6() == 0)
            {
            }
            IdiomaControles();
        }
コード例 #4
0
        void ModSeguridad()
        {
            ViewState["VblIngMS"] = 1;
            ViewState["VblModMS"] = 1;
            ViewState["VblEliMS"] = 1;
            ViewState["VblImpMS"] = 1;

            ClsPermisos ClsP = new ClsPermisos();
            string      VbPC = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName;

            ClsP.Acceder(Session["C77U"].ToString(), "FrmConfigPantalla.aspx", VbPC);

            if (ClsP.GetAccesoFrm() == 0)
            {
                Response.Redirect("WebMenuInicio.aspx");
            }
            if (ClsP.GetIngresar() == 0)
            {
                ViewState["VblIngMS"] = 0;
            }
            if (ClsP.GetModificar() == 0)
            {
                ViewState["VblModMS"] = 0;
            }
            if (ClsP.GetConsultar() == 0)
            {
            }
            if (ClsP.GetImprimir() == 0)
            {
            }
            if (ClsP.GetEliminar() == 0)
            {
                ViewState["VblEliMS"] = 0;
            }
            if (ClsP.GetCE1() == 0)
            {
            }
            if (ClsP.GetCE2() == 0)
            {
            }
            if (ClsP.GetCE3() == 0)
            {
            }
            if (ClsP.GetCE4() == 0)
            {
            }
            if (ClsP.GetCE5() == 0)
            {
            }
            if (ClsP.GetCE6() == 0)
            {
            }
        }
コード例 #5
0
        protected void ModSeguridad()
        {
            ViewState["VblIngMS"] = 1;
            ViewState["VblModMS"] = 1;
            ViewState["VblEliMS"] = 1;
            ViewState["VblImpMS"] = 1;
            ViewState["VblCE1"]   = 1;
            ViewState["VblCE2"]   = 1;
            ViewState["VblCE3"]   = 1;
            ViewState["VblCE4"]   = 1;
            ViewState["VblCE5"]   = 1;
            ViewState["VblCE6"]   = 1;
            ClsPermisos ClsP = new ClsPermisos();
            string      VbPC = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName;

            ClsP.Acceder(Session["C77U"].ToString(), ViewState["PFileName"].ToString().Trim() + ".aspx", VbPC);
            if (ClsP.GetAccesoFrm() == 0)
            {
                Response.Redirect("~/Forms/Seguridad/FrmInicio.aspx");
            }
            if (ClsP.GetIngresar() == 0)
            {
                ViewState["VblIngMS"] = 0;
            }                                                           //
            if (ClsP.GetModificar() == 0)
            {
                ViewState["VblModMS"] = 0;
            }
            if (ClsP.GetImprimir() == 0)
            {
                ViewState["VblImpMS"] = 0;
            }                                                          //
            if (ClsP.GetEliminar() == 0)
            {
                ViewState["VblEliMS"] = 0;
            }
            if (ClsP.GetCE1() == 0)
            {
                ViewState["VblCE1"] = 0; BtnAprob.Visible = false; IbtAprPNAll.Visible = false; IbtDesAprAll.Visible = false;
            }                                                                                                                                         // Aprobar

            IdiomaControles();
        }
コード例 #6
0
        protected void ModSeguridad()
        {
            ViewState["VblIngMS"] = 1;
            ViewState["VblModMS"] = 1;
            ViewState["VblEliMS"] = 1;
            ViewState["VblImpMS"] = 1;

            ClsPermisos ClsP = new ClsPermisos();
            string      VbPC = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName;

            ClsP.Acceder(Session["C77U"].ToString(), "FrmCicloDiscosMotor.aspx", VbPC);

            if (ClsP.GetAccesoFrm() == 0)
            {
                Response.Redirect("~/Forms/Seguridad/FrmInicio.aspx");
            }
            if (ClsP.GetIngresar() == 0)
            {
                ViewState["VblIngMS"] = 0;
                GrdDatos.ShowFooter   = false;
                GrdAR.ShowFooter      = false;
            }
            if (ClsP.GetModificar() == 0)
            {
                ViewState["VblModMS"] = 0;
            }
            if (ClsP.GetConsultar() == 0)
            {
            }
            if (ClsP.GetImprimir() == 0)
            {
            }
            if (ClsP.GetEliminar() == 0)
            {
                ViewState["VblEliMS"] = 0;
            }
            if (ClsP.GetCE1() == 0)
            {
                //IbtExpExcel.Visible = false;
            }
            IdiomaControles();
        }
コード例 #7
0
        protected void ModSeguridad()
        {
            ViewState["VblIngMS"] = 1;
            ViewState["VblModMS"] = 1;
            ViewState["VblImpMS"] = 1;
            ViewState["VblEliMS"] = 1;
            ViewState["VblCE1"]   = 1;
            ClsPermisos ClsP = new ClsPermisos();
            string      VbPC = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName;

            ClsP.Acceder(Session["C77U"].ToString(), ViewState["PFileName"].ToString().Trim() + ".aspx", VbPC);
            if (ClsP.GetAccesoFrm() == 0)
            {
                Response.Redirect("~/Forms/Seguridad/FrmInicio.aspx");
            }
            if (ClsP.GetIngresar() == 0)
            {
                ViewState["VblIngMS"] = 0;
            }
            if (ClsP.GetModificar() == 0)
            {
                ViewState["VblModMS"] = 0;
            }
            if (ClsP.GetConsultar() == 0)
            {
            }
            if (ClsP.GetImprimir() == 0)
            {
                ViewState["VblImpMS"] = 0;
            }
            if (ClsP.GetEliminar() == 0)
            {
                ViewState["VblEliMS"] = 0;
            }
            if (ClsP.GetCE1() == 0)
            {
                ViewState["VblCE1"] = 0;
            }                                                   //Puede modificar el usuario de la reserva

            IdiomaControles();
        }
コード例 #8
0
        protected void ModSeguridad()
        {
            ViewState["VblIngMS"]  = 1;
            ViewState["VblModMS"]  = 1;
            ViewState["VblEliMS"]  = 1;
            ViewState["VblImpMS"]  = 1;
            ViewState["VblConsMS"] = 1;

            ClsPermisos ClsP = new ClsPermisos();
            string      VbPC = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName;

            ClsP.Acceder(Session["C77U"].ToString(), "FrmElemento.aspx", VbPC);

            if (ClsP.GetAccesoFrm() == 0)
            {
                Response.Redirect("~/Forms/Seguridad/FrmInicio.aspx");
            }
            if (ClsP.GetIngresar() == 0)
            {
                ViewState["VblIngMS"] = 0;
            }
            if (ClsP.GetModificar() == 0)
            {
                ViewState["VblModMS"] = 0; BtnModificar.Visible = false;
            }
            if (ClsP.GetConsultar() == 0)
            {
                ViewState["VblConsMS"] = 0;
            }
            if (ClsP.GetImprimir() == 0)
            {
            }
            if (ClsP.GetEliminar() == 0)
            {
                ViewState["VblEliMS"] = 0;
            }
            if (ClsP.GetCE1() == 0)
            {
            }
            Cnx.SelecBD();
            using (SqlConnection sqlCon = new SqlConnection(Cnx.GetConex()))
            {
                string     VbAplica;
                int        VbCaso;
                string     TxQry   = "EXEC SP_ConfiguracionV2_ 19,'PONDERADO','PONDERADO','','','" + Session["Nit77Cia"].ToString() + "',1,2,0,0,'01-01-1','02-01-1','03-01-1'";
                SqlCommand Comando = new SqlCommand(TxQry, sqlCon);
                sqlCon.Open();
                SqlDataReader Regs = Comando.ExecuteReader();
                while (Regs.Read())
                {
                    VbAplica = Regs["EjecutarCodigo"].ToString();
                    VbCaso   = Convert.ToInt32(Regs["CASO"]);
                    if (VbCaso == 1 && VbAplica.Equals("S"))
                    {
                        // Material Serializado
                        ViewState["PondMatSN"] = "S";
                    }
                    if (VbCaso == 2 && VbAplica.Equals("S"))
                    {
                        // Componenente Serializado
                        ViewState["PondCompSN"] = "S";
                    }
                }
            }
            IdiomaControles();
        }
コード例 #9
0
        protected void ModSeguridad()
        {
            ViewState["VblIngMS"] = 1;
            ViewState["VblModMS"] = 1;
            ViewState["VblEliMS"] = 1;
            ViewState["VblImpMS"] = 1;
            ViewState["VblCE1"]   = 1;
            ViewState["VblCE2"]   = 1;

            ClsPermisos ClsP = new ClsPermisos();
            string      VbPC = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName;

            ClsP.Acceder(Session["C77U"].ToString(), ViewState["PFileName"].ToString().Trim() + ".aspx", VbPC);

            if (ClsP.GetAccesoFrm() == 0)
            {
                Response.Redirect("~/Forms/Seguridad/FrmInicio.aspx");
            }
            if (ClsP.GetIngresar() == 0)
            {
                ViewState["VblIngMS"] = 0;
                BtnIngresar.Visible   = false;
                /*GrdRecursoF.ShowFooter = false;*/
            }
            if (ClsP.GetModificar() == 0)
            {
                ViewState["VblModMS"] = 0;
                BtnModificar.Visible  = false;
            }
            if (ClsP.GetConsultar() == 0)
            {
            }
            if (ClsP.GetImprimir() == 0)
            {
                ViewState["VblImpMS"] = 0;
                //BtnImprimir.Visible = false;
            }
            if (ClsP.GetEliminar() == 0)
            {
                ViewState["VblEliMS"] = 0;
                //BtnEliminar.Visible = false;
            }
            if (ClsP.GetCE1() == 0)
            {
                //Modificar matrícula
                ViewState["VblCE1"] = 0;
            }
            if (ClsP.GetCE2() == 0)
            {
                BtnSolicitud.Visible = false;
            }
            if (ClsP.GetCE3() == 0)
            {
            }
            if (ClsP.GetCE4() == 0)
            {
            }
            if (ClsP.GetCE5() == 0)
            {
            }
            if (ClsP.GetCE6() == 0)
            {
            }

            Cnx.SelecBD();
            using (SqlConnection sqlCon = new SqlConnection(Cnx.GetConex()))
            {
                string TxQry = string.Format("EXEC SP_HabilitarCampos @Nit,@F,2,@F,3,@F,4,@F,6,@F,7,@F,8,@F,12,@F,13,@F,14");

                /*  SqlCommand SC = new SqlCommand(TxQry, sqlCon);
                 * SC.Parameters.AddWithValue("@Nit", Session["Nit77Cia"].ToString());
                 * SC.Parameters.AddWithValue("@F", "FrmReporte");
                 * sqlCon.Open();
                 * SqlDataReader Regs = SC.ExecuteReader();
                 * while (Regs.Read())
                 * {
                 *    VbCaso = Convert.ToInt32(Regs["CASO"]);
                 *    VbAplica = Regs["EjecutarCodigo"].ToString();
                 *    if (VbCaso == 2 && VbAplica.Equals("S"))
                 *    {
                 *        //Asignar por defecto usuario logiado en abrir y cerrar reporte manto
                 *        ViewState["UsuDefecto"] = "S";
                 *    }
                 * }*/
            }
            IdiomaControles();
        }
コード例 #10
0
        protected void ModSeguridad()
        {
            ViewState["VblIngMS"] = 1;
            ViewState["VblModMS"] = 1;
            ViewState["VblEliMS"] = 1;
            ViewState["VblImpMS"] = 1;
            ViewState["VblCE1"]   = 1;
            ViewState["VblCE2"]   = 1;
            ViewState["VblCE3"]   = 1;
            ViewState["VblCE4"]   = 1;
            ViewState["VblCE5"]   = 1;
            ViewState["VblCE6"]   = 1;
            ClsPermisos ClsP = new ClsPermisos();
            string      VbPC = System.Net.Dns.GetHostEntry(Request.ServerVariables["remote_addr"]).HostName;

            ClsP.Acceder(Session["C77U"].ToString(), ViewState["PFileName"].ToString().Trim() + ".aspx", VbPC);
            if (ClsP.GetAccesoFrm() == 0)
            {
                Response.Redirect("~/Forms/Seguridad/FrmInicio.aspx");
            }
            if (ClsP.GetIngresar() == 0)
            {
                ViewState["VblIngMS"] = 0; BtnIngresar.Visible = false;
                GrdDetalle.ShowFooter = false;
            }
            if (ClsP.GetModificar() == 0)
            {
                ViewState["VblModMS"] = 0; BtnModificar.Visible = false;
            }
            if (ClsP.GetConsultar() == 0)
            {
            }
            if (ClsP.GetImprimir() == 0)
            {
                ViewState["VblImpMS"] = 0;
            }
            if (ClsP.GetEliminar() == 0)
            {
                ViewState["VblEliMS"] = 0; BtnEliminar.Visible = false;
            }
            if (ClsP.GetCE1() == 0)
            {
                ViewState["VblCE1"] = 0;
            }                                                    // licencias
            if (ClsP.GetCE2() == 0)
            {
                ViewState["VblCE2"] = 0;
            }                                                   //asignar Cursos
            if (ClsP.GetCE3() == 0)
            {
                ViewState["VblCE3"] = 0;
            }                                                   // boton para asignar la persona al grupo de manto y crar usuario
            if (ClsP.GetCE4() == 0)
            {
            }
            if (ClsP.GetCE5() == 0)
            {
            }
            if (ClsP.GetCE6() == 0)
            {
            }

            Cnx.SelecBD();
            using (SqlConnection sqlCon = new SqlConnection(Cnx.GetConex()))
            {
                string     VbAplica;
                int        VbCaso;
                string     TxQry = string.Format("EXEC SP_HabilitarCampos @Nit,@F,1,'',0,'',0,'',0,'',0,'',0,'',0,'',0,'',0");
                SqlCommand SC    = new SqlCommand(TxQry, sqlCon);
                SC.Parameters.AddWithValue("@Nit", Session["Nit77Cia"].ToString());
                SC.Parameters.AddWithValue("@F", "MRO");
                sqlCon.Open();
                SqlDataReader Regs = SC.ExecuteReader();
                while (Regs.Read())
                {
                    VbCaso   = Convert.ToInt32(Regs["CASO"]);
                    VbAplica = Regs["EjecutarCodigo"].ToString();
                    if (VbCaso == 1 && VbAplica.Equals("S"))
                    {
                        LblCliente.Visible = true; DdlCliente.Visible = true;
                    }
                }
            }
            IdiomaControles();
        }