예제 #1
0
        public SqlDataAdapter ListarEmpleados()
        {
            CargaParametroMat();
            RegCatEmpleado OpLst = new RegCatEmpleado(db);

            return(OpLst.ListEmpleados());
        }
예제 #2
0
        public int ActualizaEmpleado()
        {
            CargaParametroMat();
            RegCatEmpleado OpUp = new RegCatEmpleado(MatParam, db);

            return(OpUp.UpdateEmpleado());
        }
예제 #3
0
        public int AgregarEmpleado()
        {
            CargaParametroMat();
            RegCatEmpleado OpRadd = new RegCatEmpleado(MatParam, db);

            return(OpRadd.AddRegEmpleado());
        }
예제 #4
0
        public int EliminaEmpleado()
        {
            //CargaParametroMat();
            MatParam       = new object[1, 2];
            MatParam[0, 0] = "CodEmpleado"; MatParam[0, 1] = CodEmpleado;
            RegCatEmpleado OpDel = new RegCatEmpleado(MatParam, db);

            return(OpDel.DeleteEmpleado());
        }
예제 #5
0
        public SqlDataAdapter BuscaEmpleado(string buscar)
        {
            /* MatParam = new object[4, 2];
             * MatParam[0, 0] = "CodEmpleado"; MatParam[0, 1] = buscar;
             * MatParam[1, 0] = "Descripcion"; MatParam[1, 1] = buscar;
             * MatParam[2, 0] = "Ubicacion"; MatParam[2, 1] = buscar;
             * MatParam[3, 0] = "Encargado"; MatParam[3, 1] = buscar;
             * RegCatEmpleado OpBsq = new RegCatEmpleado(MatParam);/
             */
            RegCatEmpleado OpBsq = new RegCatEmpleado(db);

            return(OpBsq.BuscaEmpleado(buscar));
        }
예제 #6
0
        public void EditarEmpleado()
        {
            MatParam       = new object[1, 2];
            MatParam[0, 0] = "CodEmpleado"; MatParam[0, 1] = CodEmpleado;
            RegCatEmpleado OpEdit = new RegCatEmpleado(MatParam, db);

            Datos = OpEdit.RegistroActivo();
            DataSet Ds = new DataSet();

            Datos.Fill(Ds);
            object[] ObjA = Ds.Tables[0].Rows[0].ItemArray;

            CodEmpleado = ObjA[0].ToString();
            Nombre      = ObjA[1].ToString();
            Telefono    = ObjA[2].ToString();
            Estatus     = ObjA[3].ToString();
        }