示例#1
0
        public void Fill_ServciosPorCitas(ref cls_ServciosPorCitas_DAL Obj_ServciosPorCitas_DAL)
        {
            cls_BD_BLL        Obj_BD_BLL        = new cls_BD_BLL();
            cls_BD_DAL        Obj_BD_DAL        = new cls_BD_DAL();
            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@filtro", "1", Obj_ServciosPorCitas_DAL.iId); //HAY Q REVISAR//


            Obj_BD_DAL.sParametro   = ConfigurationManager.AppSettings["filtrarservicioporcitas"].ToString();
            Obj_BD_DAL.sNombreTabla = ConfigurationManager.AppSettings["tablaservicioporcitas"].ToString();

            Obj_BD_BLL.Excute_DataAdapter(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                Obj_ServciosPorCitas_DAL.dData     = Obj_BD_DAL.Ds;
                Obj_ServciosPorCitas_DAL.sMgsError = string.Empty;
            }
            else
            {
                Obj_ServciosPorCitas_DAL.dData     = null;
                Obj_ServciosPorCitas_DAL.sMgsError = Obj_BD_DAL.sMsError;
            }
        }
示例#2
0
        public void Listar_TiposClientes(ref cls_TiposClientes_DAL Obj_TiposClientes_DAL)
        {
            try
            {
                cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
                cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

                Obj_BD_DAL.SNomb_Sp   = "sp_Listar_TiposClientes";
                Obj_BD_DAL.SNombTabla = "TiposClientes";

                Obj_BD_BLL.Exec_DataAdapter(ref Obj_BD_DAL);

                if (Obj_BD_DAL.SMsjError == string.Empty)
                {
                    Obj_TiposClientes_DAL.Obj_DT    = Obj_BD_DAL.Obj_DS.Tables[0];
                    Obj_TiposClientes_DAL.SMsjError = string.Empty;
                }
                else
                {
                    Obj_TiposClientes_DAL.SMsjError = Obj_BD_DAL.SMsjError;
                }
            }
            catch (Exception ex)
            {
                Obj_TiposClientes_DAL.SMsjError = ex.Message.ToString();
            }
        }
        public void Update_Proveedor(ref cls_Proveedor_DAL obj_Proveedor_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Nombre", "1", obj_Proveedor_DAL.sNombre);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Direccion", "1", obj_Proveedor_DAL.sDireccion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Estado", "3", obj_Proveedor_DAL.cEstado);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Capacitación", "2", obj_Proveedor_DAL.iId_Capa);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id", "2", obj_Proveedor_DAL.iCod_Provee);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["modificarproveedor"].ToString();

            Obj_BD_BLL.Excute_NonQuery(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                obj_Proveedor_DAL.sMgsError = string.Empty;
            }
            else
            {
                obj_Proveedor_DAL.sMgsError = Obj_BD_DAL.sMsError;
            }
        }
        public void Insert_OrdenServicio(ref cls_OrdenDeServicio_DAL Obj_OrdenDeServicio_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@NumeroParte", "1", Obj_OrdenDeServicio_DAL.sNumeroParte);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Cantidad", "2", Obj_OrdenDeServicio_DAL.iCantidad);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@DescripcionMaterial", "2", Obj_OrdenDeServicio_DAL.sDescripcion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Entrega", "1", Obj_OrdenDeServicio_DAL.sEntrega);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Crea_Empleados", "2", Obj_OrdenDeServicio_DAL.iCod_Emple);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@FechaCreado", "6", Obj_OrdenDeServicio_DAL.Fecha);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Material", "2", Obj_OrdenDeServicio_DAL.iId_Material);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Cita", "2", Obj_OrdenDeServicio_DAL.iId_Cita);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["insertarordenservicio"].ToString();

            Obj_BD_BLL.Excute_Scalar(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                Obj_OrdenDeServicio_DAL.sMgsError = string.Empty;
                //obj_LineasDeTrabajo_DAL.iId_Rol = Convert.ToInt32(Obj_BD_DAL.sValorScalar.ToString());
            }
            else
            {
                Obj_OrdenDeServicio_DAL.sMgsError = Obj_BD_DAL.sMsError;
                //obj_LineasDeTrabajo_DAL.iId_LineasDeTrabajo = -1;
            }
        }
        public void Insert_Identificacion(ref cls_TipoIdentificacion_DAL obj_Identificacion_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Nombre", "1", obj_Identificacion_DAL.sNombre);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Descripcion", "1", obj_Identificacion_DAL.iCod_Identificacion);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["insertaridentificaciones"].ToString();

            Obj_BD_BLL.Excute_Scalar(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                obj_Identificacion_DAL.sMgsError           = string.Empty;
                obj_Identificacion_DAL.iCod_Identificacion = Convert.ToInt32(Obj_BD_DAL.sValorScalar.ToString());
            }
            else
            {
                obj_Identificacion_DAL.sMgsError           = Obj_BD_DAL.sMsError;
                obj_Identificacion_DAL.iCod_Identificacion = -1;
            }
        }
示例#6
0
        public void Update_EstadosCitas(ref cls_EstadosCitas_DAL Obj_EstadosCitas_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Descripcion", "1", Obj_EstadosCitas_DAL.sDescripcion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Estado", "7", Obj_EstadosCitas_DAL.cEstado);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@@Id_Actualiza_Empleados", "2", Obj_EstadosCitas_DAL.iCod_Emple);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@FechaActualizado", "6", Obj_EstadosCitas_DAL.Fecha);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["modificarestadoscitas"].ToString();

            Obj_BD_BLL.Excute_NonQuery(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                Obj_EstadosCitas_DAL.sMgsError = string.Empty;
            }
            else
            {
                Obj_EstadosCitas_DAL.sMgsError = Obj_BD_DAL.sMsError;
            }
        }
        public void Update_OrdenServicio(ref cls_OrdenDeServicio_DAL Obj_OrdenDeServicio_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@NumeroParte", "1", Obj_OrdenDeServicio_DAL.sNumeroParte);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Cantidad", "2", Obj_OrdenDeServicio_DAL.iCantidad);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@DescripcionMaterial", "2", Obj_OrdenDeServicio_DAL.sDescripcion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Entrega", "1", Obj_OrdenDeServicio_DAL.sEntrega);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@DescripcionEstPuntReorden", "1", Obj_OrdenDeServicio_DAL.sDescripcion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@FechaActualizado", "6", Obj_OrdenDeServicio_DAL.Fecha);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Material", "2", Obj_OrdenDeServicio_DAL.iId_Material);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Cita", "2", Obj_OrdenDeServicio_DAL.iId_Cita);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["modificarordenservicio"].ToString();

            Obj_BD_BLL.Excute_NonQuery(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                Obj_OrdenDeServicio_DAL.sMgsError = string.Empty;
            }
            else
            {
                Obj_OrdenDeServicio_DAL.sMgsError = Obj_BD_DAL.sMsError;
            }
        }
示例#8
0
        public void Update_Inventario(ref cls_Inventario_DAL Obj_Inventario_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@NumeroParte", "1", Obj_Inventario_DAL.sNumeroParte);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@DescripcionMaterial", "1", Obj_Inventario_DAL.sDescripcion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@CantidadSistema", "2", Obj_Inventario_DAL.iCantidadSistema);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@CantidadReservada", "2", Obj_Inventario_DAL.iCantidadReservada);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Ubicacion", "1", Obj_Inventario_DAL.sUbicacion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@EstadoMaterial", "1", Obj_Inventario_DAL.sEstadoMaterial);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Unidad_Medida", "2", Obj_Inventario_DAL.iId_UnidadMedida);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@FechaActualizado", "6", Obj_Inventario_DAL.Fecha);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["modificarinventarios"].ToString();

            Obj_BD_BLL.Excute_NonQuery(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                Obj_Inventario_DAL.sMgsError = string.Empty;
            }
            else
            {
                Obj_Inventario_DAL.sMgsError = Obj_BD_DAL.sMsError;
            }
        }
示例#9
0
        public void Insert_Inventario(ref cls_Inventario_DAL Obj_Inventario_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@NumeroParte", "1", Obj_Inventario_DAL.sNumeroParte);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@DescripcionMaterial", "1", Obj_Inventario_DAL.sDescripcion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@CantidadSistema", "2", Obj_Inventario_DAL.iCantidadSistema);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@CantidadReservada", "2", Obj_Inventario_DAL.iCantidadReservada);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Ubicacion", "1", Obj_Inventario_DAL.sUbicacion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@EstadoMaterial", "1", Obj_Inventario_DAL.sEstadoMaterial);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Unidad_Medida", "2", Obj_Inventario_DAL.iId_UnidadMedida);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Crea_Empleados", "2", Obj_Inventario_DAL.iCod_Emple);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@FechaCreado", "6", Obj_Inventario_DAL.Fecha);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["insertarinventarios"].ToString();

            Obj_BD_BLL.Excute_Scalar(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                Obj_Inventario_DAL.sMgsError = string.Empty;
                //obj_LineasDeTrabajo_DAL.iId_Rol = Convert.ToInt32(Obj_BD_DAL.sValorScalar.ToString());
            }
            else
            {
                Obj_Inventario_DAL.sMgsError = Obj_BD_DAL.sMsError;
                //obj_LineasDeTrabajo_DAL.iId_LineasDeTrabajo = -1;
            }
        }
        public void Update_MantenimientoInventario(ref cls_MantenimientoInventarios_DAL Obj_MantenimientoInventarios_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@NumeroParte", "1", Obj_MantenimientoInventarios_DAL.sNumeroParte);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@DescripcionMaterial", "1", Obj_MantenimientoInventarios_DAL.sDescripcion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Cantidad", "2", Obj_MantenimientoInventarios_DAL.iCantidad);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@TipoAjuste", "1", Obj_MantenimientoInventarios_DAL.sTipoAjuste);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Unidad_Medida", "2", Obj_MantenimientoInventarios_DAL.iId_UnidadMedida);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Inventarios", "2", Obj_MantenimientoInventarios_DAL.iId_Inventarios);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Actualiza_Empleados", "2", Obj_MantenimientoInventarios_DAL.iCod_Emple);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@FechaActualizado", "6", Obj_MantenimientoInventarios_DAL.Fecha);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["modificarmantenimientoinventario"].ToString();

            Obj_BD_BLL.Excute_NonQuery(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                Obj_MantenimientoInventarios_DAL.sMgsError = string.Empty;
            }
            else
            {
                Obj_MantenimientoInventarios_DAL.sMgsError = Obj_BD_DAL.sMsError;
            }
        }
示例#11
0
        public void Insert_Combustible(ref cls_Combustible_DAL Obj_Combustible_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Descripcion", "1", Obj_Combustible_DAL.sDescripcion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Estado", "3", Obj_Combustible_DAL.cEstado);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Crea_Empleados", "2", Obj_Combustible_DAL.iCod_EmpleCreador);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@FechaCreado", "6", Obj_Combustible_DAL.FechaCreado);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["insertarcombustibles"].ToString();

            Obj_BD_BLL.Excute_Scalar(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                Obj_Combustible_DAL.sMgsError = string.Empty;
                //Obj_Combustible_DAL.iCod_Combustible = Convert.ToInt32(Obj_BD_DAL.sValorScalar.ToString());
            }
            else
            {
                Obj_Combustible_DAL.sMgsError = Obj_BD_DAL.sMsError;
                //Obj_Combustible_DAL.iCod_Combustible = -1;
            }
        }
示例#12
0
        public void Update_MantenimientoMateriales(ref cls_MantenimientoMateriales_DAL Obj_MantenimientoMateriales_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@FamiliaMaterial", "1", Obj_MantenimientoMateriales_DAL.sFamiliaMaterial);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Ubicacion", "1", Obj_MantenimientoMateriales_DAL.sUbicacion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@DescripcionMaterial", "1", Obj_MantenimientoMateriales_DAL.sDescripcion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@PrecioMaterial", "4", Obj_MantenimientoMateriales_DAL.fPrecio);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@EstadoMaterial", "1", Obj_MantenimientoMateriales_DAL.sEstadoMaterial);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Inventarios", "2", Obj_MantenimientoMateriales_DAL.iId_Inventarios);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Unidad_Medida", "2", Obj_MantenimientoMateriales_DAL.iId_UnidadMedida);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Actualiza_Empleados", "2", Obj_MantenimientoMateriales_DAL.iCod_Emple);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@FechaActualizado", "6", Obj_MantenimientoMateriales_DAL.Fecha);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["modificarmantenimientomateriales"].ToString();

            Obj_BD_BLL.Excute_NonQuery(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                Obj_MantenimientoMateriales_DAL.sMgsError = string.Empty;
            }
            else
            {
                Obj_MantenimientoMateriales_DAL.sMgsError = Obj_BD_DAL.sMsError;
            }
        }
示例#13
0
        public void CompararLogin(ref DataTable dtLogin, string sUsuario, string sContrasenia, ref string sMsjError)
        {
            #region VARIABLES LOCALES

            Obj_BD_DAL = new cls_BD_DAL();
            Obj_BD_BLL = new cls_BD_BLL();

            #endregion

            DataTable dtParametros = Obj_Generales_BLL.CrearTablaParametros();


            if (dtParametros.Columns.Count == 3)
            {
                dtParametros.Rows.Add("@Nombre_Usuario", 2, sUsuario);
                dtParametros.Rows.Add("@Contrasenia", 2, sContrasenia);
                Obj_BD_BLL.Execute_Fill("VETSPA.SP_FILTRAR_Login", "Login", dtParametros, ref Obj_BD_DAL);

                if (Obj_BD_DAL.sMsjError == string.Empty)
                {
                    sMsjError = string.Empty;
                    dtLogin   = Obj_BD_DAL.DS.Tables[0];
                }
                else
                {
                    sMsjError = Obj_BD_DAL.sMsjError;
                    dtLogin   = new DataTable();
                }
            }
            else
            {
                sMsjError = "Se presento un erro ala hora de crear el data table";
            }
        }
示例#14
0
        public void Insert_ServciosPorCitas(ref cls_ServciosPorCitas_DAL obj_ServciosPorCitas_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            /*
             *        (@Id_Citas int,
             * @Id_Servicios int,
             * @Id_Crea_Empleados int,
             * @FechaCreado datetime)
             */
            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Citas", "2", obj_ServciosPorCitas_DAL.iIdCitas);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Servicios", "2", obj_ServciosPorCitas_DAL.iIdServicios);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Crea_Empleados", "2", obj_ServciosPorCitas_DAL.iIdEmp);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@FechaCreado", "7", obj_ServciosPorCitas_DAL.datFechaCr);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["insertarservicioporcitas"].ToString();

            Obj_BD_BLL.Excute_NonQuery(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                obj_ServciosPorCitas_DAL.sMgsError = string.Empty;
            }
            else
            {
                obj_ServciosPorCitas_DAL.sMgsError = Obj_BD_DAL.sMsError;
            }
        }
示例#15
0
        public void Insert_Capacitacion(ref cls_Capacitacion_DAL obj_Capacitacion_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Nombre", "1", obj_Capacitacion_DAL.sNombre);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Direccion", "1", obj_Capacitacion_DAL.sDireccion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Estado", "3", obj_Capacitacion_DAL.cEstado);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Puesto", "2", obj_Capacitacion_DAL.iCod_Puesto);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["insertarcapacitacion"].ToString();

            Obj_BD_BLL.Excute_Scalar(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                obj_Capacitacion_DAL.sMgsError = string.Empty;
                //obj_Capacitacion_DAL.iCod_Capac = Convert.ToInt32(Obj_BD_DAL.sValorScalar.ToString());
            }
            else
            {
                obj_Capacitacion_DAL.sMgsError  = Obj_BD_DAL.sMsError;
                obj_Capacitacion_DAL.iCod_Capac = -1;
            }
        }
 public void CrearDTParametros(ref cls_BD_DAL Obj_BD_DAL)
 {
     Obj_BD_DAL.Dt_Parametros = new DataTable("Parametros_SP");
     Obj_BD_DAL.Dt_Parametros.Columns.Add("Nombre_Par");
     Obj_BD_DAL.Dt_Parametros.Columns.Add("Tipo_Dato_Par");
     Obj_BD_DAL.Dt_Parametros.Columns.Add("Valor_Par");
 }
示例#17
0
        public void Filtrar_Entradas(ref DataTable dtEntradas, string sFiltro, ref string sMsjError)
        {
            #region VARIABLES LOCALES

            Obj_BD_DAL = new cls_BD_DAL();
            Obj_BD_BLL = new cls_BD_BLL();

            #endregion

            DataTable dtParametros = Obj_Generales_BLL.CrearTablaParametros();


            if (dtParametros.Columns.Count == 3)
            {
                dtParametros.Rows.Add("@consec_entada", 2, sFiltro);
                Obj_BD_BLL.Execute_Fill("VETSPA.sp_listarentradas", "Entradas", dtParametros, ref Obj_BD_DAL);

                if (Obj_BD_DAL.sMsjError == string.Empty)
                {
                    sMsjError  = string.Empty;
                    dtEntradas = Obj_BD_DAL.DS.Tables[0];
                }
                else
                {
                    sMsjError  = Obj_BD_DAL.sMsjError;
                    dtEntradas = new DataTable();
                }
            }
            else
            {
                sMsjError = "Se presento un erro ala hora de crear el data table";
            }
        }
示例#18
0
        public void Update_InsumosPorServicio(ref cls_InsumosPorServicio_DAL obj_InsumosPorServicio_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Servicios", "1", obj_InsumosPorServicio_DAL.iId_Servicios);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Estado", "7", obj_InsumosPorServicio_DAL.cEstado);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Insumos", "2", obj_InsumosPorServicio_DAL.iId_Insumos);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Actualiza_Empleados", "2", obj_InsumosPorServicio_DAL.iId_Crea_Empleado);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@FechaActualizado", "6", obj_InsumosPorServicio_DAL.fecha);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["modificarinsumosporservicio"].ToString();

            Obj_BD_BLL.Excute_NonQuery(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                obj_InsumosPorServicio_DAL.sMgsError = string.Empty;
            }
            else
            {
                obj_InsumosPorServicio_DAL.sMgsError = Obj_BD_DAL.sMsError;
            }
        }
示例#19
0
        public void Insert_EstadosCitas(ref cls_EstadosCitas_DAL Obj_EstadosCitas_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Descripcion", "1", Obj_EstadosCitas_DAL.sDescripcion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Estado", "3", Obj_EstadosCitas_DAL.cEstado);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Crea_Empleados", "2", Obj_EstadosCitas_DAL.iCod_Emple);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@FechaCreado", "6", Obj_EstadosCitas_DAL.Fecha);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["insertarestadoscitas"].ToString();

            Obj_BD_BLL.Excute_Scalar(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                Obj_EstadosCitas_DAL.sMgsError = string.Empty;
                //obj_LineasDeTrabajo_DAL.iId_Rol = Convert.ToInt32(Obj_BD_DAL.sValorScalar.ToString());
            }
            else
            {
                Obj_EstadosCitas_DAL.sMgsError = Obj_BD_DAL.sMsError;
                //obj_LineasDeTrabajo_DAL.iId_LineasDeTrabajo = -1;
            }
        }
示例#20
0
        public void Insert_InsumosPorServicio(ref cls_InsumosPorServicio_DAL obj_InsumosPorServicio_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Servicios", "2", obj_InsumosPorServicio_DAL.iId_Servicios);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Estado", "7", obj_InsumosPorServicio_DAL.cEstado);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Insumos", "2", obj_InsumosPorServicio_DAL.iId_Insumos);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Crea_Empleados", "2", obj_InsumosPorServicio_DAL.iId_Crea_Empleado);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@FechaCreado", "6", obj_InsumosPorServicio_DAL.fecha);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["insertarinsumosporservicio"].ToString();

            Obj_BD_BLL.Excute_Scalar(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                obj_InsumosPorServicio_DAL.sMgsError = string.Empty;
                //obj_LineasDeTrabajo_DAL.iId_Rol = Convert.ToInt32(Obj_BD_DAL.sValorScalar.ToString());
            }
            else
            {
                obj_InsumosPorServicio_DAL.sMgsError = Obj_BD_DAL.sMsError;
                //obj_LineasDeTrabajo_DAL.iId_LineasDeTrabajo = -1;
            }
        }
        public void Fill_OrdenDeServicio(ref cls_OrdenDeServicio_DAL Obj_OrdenDeServicio_DAL)
        {
            cls_BD_BLL        Obj_BD_BLL        = new cls_BD_BLL();
            cls_BD_DAL        Obj_BD_DAL        = new cls_BD_DAL();
            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@filtro", "1", Obj_OrdenDeServicio_DAL.sDescripcion);

            Obj_BD_DAL.sParametro   = ConfigurationManager.AppSettings["filtrarordenservicio"].ToString();
            Obj_BD_DAL.sNombreTabla = ConfigurationManager.AppSettings["tablaordenservicio"].ToString();

            Obj_BD_BLL.Excute_DataAdapter(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                Obj_OrdenDeServicio_DAL.dData     = Obj_BD_DAL.Ds;
                Obj_OrdenDeServicio_DAL.sMgsError = string.Empty;
            }
            else
            {
                Obj_OrdenDeServicio_DAL.dData     = null;
                Obj_OrdenDeServicio_DAL.sMgsError = Obj_BD_DAL.sMsError;
            }
        }
示例#22
0
        public void Listar_Tipo_Vehiculo()
        {
            try
            {
                cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
                cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

                Obj_BD_DAL.SNomb_Sp   = "sp_Listar_Tipo_Vehiculo";
                Obj_BD_DAL.SNombTabla = "T_TIPO_VEHICULO";

                Obj_BD_BLL.ExecuteDataAdapter("a", "b", "@parametro", "c");

                if (Obj_BD_DAL.SNomb_Sp == string.Empty)
                {
                    Obj_Tipo_Vehiculo_DAL.Obj_DT    = Obj_BD_DAL.Obj_DS.Tables[0];
                    Obj_Tipo_Vehiculo_DAL.sMsjError = string.Empty;
                }
                else
                {
                    Obj_Tipo_Vehiculo_DAL.sMsjError = Obj_BD_DAL.sMsj_Error;
                }
            }
            catch (Exception ex)
            {
                Obj_Tipo_Vehiculo_DAL.sMsjError = ex.Message.ToString();
            }
        }
示例#23
0
        public void Listar_Estados(ref cls_PRODUCTOS_DAL Obj_PRODUCTOS_DAL)
        {
            try
            {
                cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
                cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

                Obj_BD_DAL.SNomb_Sp   = "sp_Listar_Productos";
                Obj_BD_DAL.SNombTabla = "Productos";

                Obj_BD_BLL.Exec_DataAdapter(ref Obj_BD_DAL);

                if (Obj_BD_DAL.SMsjError == string.Empty)
                {
                    Obj_PRODUCTOS_DAL.Obj_DT    = Obj_BD_DAL.Obj_DS.Tables[0];
                    Obj_PRODUCTOS_DAL.SMsjError = string.Empty;
                }
                else
                {
                    Obj_PRODUCTOS_DAL.SMsjError = Obj_BD_DAL.SMsjError;
                }
            }
            catch (Exception ex)
            {
                Obj_PRODUCTOS_DAL.SMsjError = ex.Message.ToString();
            }
        }
示例#24
0
        public void Filtrar_Tipo_Vehiculo(ref Cls_Tipo_Vehiculo_DAL Obj_Tipo_Vehiculo_DAL, string sFiltro)
        {
            try
            {
                cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
                cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

                Obj_BD_DAL.SNomb_Sp   = "sp_Listar_Tipo_Vehiculo";
                Obj_BD_DAL.SNombTabla = "T_TIPO_VEHICULO";

                Obj_BD_BLL.Crear_DT_Parametros(ref Obj_BD_DAL);

                Obj_BD_DAL.dt_Parametros.Rows.Add("@Filtro", "2", sFiltro);

                Obj_BD_BLL.ExecuteDataAdapter("a", "b", "@parametro", "c");

                if (Obj_BD_DAL.sMsj_Error == string.Empty)
                {
                    Obj_Tipo_Vehiculo_DAL.Obj_DT    = Obj_BD_DAL.Obj_DS.Tables[0];
                    Obj_Tipo_Vehiculo_DAL.sMsjError = string.Empty;
                }
                else
                {
                    Obj_Tipo_Vehiculo_DAL.sMsjError = Obj_BD_DAL.sMsj_Error;
                }
            }
            catch (Exception ex)
            {
                Obj_Tipo_Vehiculo_DAL.sMsjError = ex.Message.ToString();
            }
        }
        public void Update_Identificaciones(ref cls_TipoIdentificacion_DAL obj_Identificaciones_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Nombre", "1", obj_Identificaciones_DAL.sNombre);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Descripcion", "1", obj_Identificaciones_DAL.iCod_Identificacion);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["modificaridentificaciones"].ToString();

            Obj_BD_BLL.Excute_NonQuery(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                obj_Identificaciones_DAL.sMgsError = string.Empty;
            }
            else
            {
                obj_Identificaciones_DAL.sMgsError = Obj_BD_DAL.sMsError;
            }
        }
示例#26
0
        public void Update_Citas(ref cls_Citas_DAL Obj_Citas_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Clientes", "2", Obj_Citas_DAL.id_Cliente);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_VehiculosPorClientes", "2", Obj_Citas_DAL.id_VehiculosPorClientes);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_EstadosCitas", "2", Obj_Citas_DAL.idEstadosCitas);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Fecha", "6", Obj_Citas_DAL.FechaCita);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Hora", "7", Obj_Citas_DAL.Hora); //Capturar hora
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@@Id_Actualiza_Empleados", "2", Obj_Citas_DAL.iCod_Emple);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@FechaActualizado", "6", Obj_Citas_DAL.Fecha);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["modificarcitas"].ToString();

            Obj_BD_BLL.Excute_NonQuery(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                Obj_Citas_DAL.sMgsError = string.Empty;
            }
            else
            {
                Obj_Citas_DAL.sMgsError = Obj_BD_DAL.sMsError;
            }
        }
示例#27
0
        public void Filtrar_TiposClientes(ref cls_TiposClientes_DAL Obj_TiposClientes_DAL, string sFiltro)
        {
            try
            {
                cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
                cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

                Obj_BD_DAL.SNomb_Sp   = "sp_Filtrar_TiposClientes";
                Obj_BD_DAL.SNombTabla = "TiposClientes";

                Obj_BD_BLL.Crear_DT_Parametros(ref Obj_BD_DAL);
                Obj_BD_DAL.dt_Parametros.Rows.Add("@Descripcion", "3", sFiltro);

                Obj_BD_BLL.Exec_DataAdapter(ref Obj_BD_DAL);

                if (Obj_BD_DAL.SMsjError == string.Empty)
                {
                    Obj_TiposClientes_DAL.Obj_DT    = Obj_BD_DAL.Obj_DS.Tables[0];
                    Obj_TiposClientes_DAL.SMsjError = string.Empty;
                }
                else
                {
                    Obj_TiposClientes_DAL.SMsjError = Obj_BD_DAL.SMsjError;
                }
            }
            catch (Exception ex)
            {
                Obj_TiposClientes_DAL.SMsjError = ex.Message.ToString();
            }
        }
示例#28
0
        public void Fill_Citas(ref cls_Citas_DAL Obj_Citas_DAL)
        {
            cls_BD_BLL        Obj_BD_BLL        = new cls_BD_BLL();
            cls_BD_DAL        Obj_BD_DAL        = new cls_BD_DAL();
            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);

            //Se filtra por nombre de tabla clientes o por número de placa de tablas Vehiculos por clientes
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@filtro", "1", Obj_Citas_DAL.sDescripcion);

            Obj_BD_DAL.sParametro   = ConfigurationManager.AppSettings["filtrarcitas"].ToString();
            Obj_BD_DAL.sNombreTabla = ConfigurationManager.AppSettings["tablacitas"].ToString();

            Obj_BD_BLL.Excute_DataAdapter(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                Obj_Citas_DAL.dData     = Obj_BD_DAL.Ds;
                Obj_Citas_DAL.sMgsError = string.Empty;
            }
            else
            {
                Obj_Citas_DAL.dData     = null;
                Obj_Citas_DAL.sMgsError = Obj_BD_DAL.sMsError;
            }
        }
        public void Fill_Proveedor(ref cls_Proveedor_DAL Obj_Proveedor_DAL)
        {
            cls_BD_BLL        Obj_BD_BLL        = new cls_BD_BLL();
            cls_BD_DAL        Obj_BD_DAL        = new cls_BD_DAL();
            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@filtro", "1", Obj_Proveedor_DAL.iCod_Provee);

            Obj_BD_DAL.sParametro   = ConfigurationManager.AppSettings["filtrarproveedor"].ToString();
            Obj_BD_DAL.sNombreTabla = ConfigurationManager.AppSettings["tablaproveedor"].ToString();

            Obj_BD_BLL.Excute_DataAdapter(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                Obj_Proveedor_DAL.dData     = Obj_BD_DAL.Ds;
                Obj_Proveedor_DAL.sMgsError = string.Empty;
            }
            else
            {
                Obj_Proveedor_DAL.dData     = null;
                Obj_Proveedor_DAL.sMgsError = Obj_BD_DAL.sMsError;
            }
        }
示例#30
0
        public void Update_Marcas(ref cls_Marcas_DAL obj_Marcas_DAL)
        {
            cls_BD_BLL Obj_BD_BLL = new cls_BD_BLL();
            cls_BD_DAL Obj_BD_DAL = new cls_BD_DAL();

            cls_Generales_BLL Obj_Generales_BLL = new cls_Generales_BLL();

            Obj_Generales_BLL.CrearDTParametros(ref Obj_BD_DAL);

            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Descripcion", "1", obj_Marcas_DAL.sDescripcion);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_TiposVehiculos", "2", obj_Marcas_DAL.Id_TiposVehi);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Estado", "7", obj_Marcas_DAL.bEstado);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@Id_Actualiza_Empleados", "2", obj_Marcas_DAL.iCod_Emple);
            Obj_BD_DAL.Dt_Parametros.Rows.Add("@FechaCreado", "6", obj_Marcas_DAL.FechaCreado);

            Obj_BD_DAL.sParametro = ConfigurationManager.AppSettings["modificarservicioporcitas"].ToString();

            Obj_BD_BLL.Excute_NonQuery(ref Obj_BD_DAL);

            if (Obj_BD_DAL.sMsError == string.Empty)
            {
                obj_Marcas_DAL.sMgsError = string.Empty;
            }
            else
            {
                obj_Marcas_DAL.sMgsError = Obj_BD_DAL.sMsError;
            }
        }