public bool LlenarGridPorCriterio()
        {
            if (grdReservas == null)
            {
                error = "No definió el grid de reservas";
                return(false);
            }
            SQL = "SP_Consultar_ReservaXCodigo";
            clsGrid oGrid = new clsGrid();

            oGrid.SQL          = SQL;
            oGrid.gridGenerico = grdReservas;
            oGrid.AgregarParametro("@Codigo", codigo);
            oGrid.StoredProcedure = true;
            if (oGrid.LlenarGridWeb())
            {
                grdReservas = oGrid.gridGenerico;
                oGrid       = null;
                return(true);
            }
            else
            {
                error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
        public bool LlenarGrid()
        {
            if (grdAlquiler == null)
            {
                error = "No definió el grid de alquileres";
                return(false);
            }
            SQL = "SP_Consultar_Alquiler";
            clsGrid oGrid = new clsGrid();

            oGrid.SQL             = SQL;
            oGrid.gridGenerico    = grdAlquiler;
            oGrid.StoredProcedure = true;
            if (oGrid.LlenarGridWeb())
            {
                grdAlquiler = oGrid.gridGenerico;
                oGrid       = null;
                return(true);
            }
            else
            {
                error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
Exemple #3
0
        public bool LlenarGridPorCriterio()
        {
            if (grdInformePagos == null)
            {
                error = "No definió el grid del informe de pagos";
                return(false);
            }
            SQL = "SP_Consultar_PagoXCriterio";
            clsGrid oGrid = new clsGrid();

            oGrid.SQL          = SQL;
            oGrid.gridGenerico = grdInformePagos;
            oGrid.AgregarParametro("@parametro_busqueda", parametroBusqueda);
            oGrid.AgregarParametro("@fecha_inicial", parametroFechaInicial);
            oGrid.AgregarParametro("@fecha_final", parametroFechaFinal);
            oGrid.StoredProcedure = true;
            if (oGrid.LlenarGridWeb())
            {
                grdInformePagos = oGrid.gridGenerico;
                oGrid           = null;
                return(true);
            }
            else
            {
                error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
Exemple #4
0
        public bool LlenarCiudad()
        {
            if (gvCiudad == null)
            {
                strError = "NO se asignó GridView a poblar";
                return(false);
            }

            objGrid = new clsGrid();

            objGrid.gsSql      = "sp_Ciudad";
            objGrid.gsNomTabla = "Ciudad";
            objGrid.gsGvGen    = gvCiudad;

            if (!objGrid.LlenarGridWeb())
            {
                strError = objGrid.gError;
                objGrid  = null;
                return(false);
            }

            gvCiudad = objGrid.gsGvGen;

            objGrid = null;
            return(true);
        }
Exemple #5
0
        public bool LlenarGrid()
        {
            if (grdFactura == null)
            {
                Error = "No definió el grid de la Factura";
                return(false);
            }
            SQL = "Factura_LlenarGrid";
            clsGrid oGrid = new clsGrid();

            oGrid.SQL             = SQL;
            oGrid.StoredProcedure = true;
            oGrid.AgregarParametro("@prNumeroFactura", NumeroFactura);
            oGrid.gridGenerico    = grdFactura;
            oGrid.StoredProcedure = true;
            if (oGrid.LlenarGridWeb())
            {
                grdFactura = oGrid.gridGenerico;
                oGrid      = null;
                return(true);
            }
            else
            {
                Error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            if (!CheckDetailsEntries())
            {
                return;
            }


            clsGrid newRow = new clsGrid();

            newRow.clmSwid        = "";
            newRow.clmFieldType   = lstControlType.Text;
            newRow.clmFieldNameAr = txtArName.Text;
            newRow.clmFieldNameEn = txtEnName.Text;
            newRow.clmNote        = txtPROPERITY_NOTE.Text;
            newRow.clmListTypeId  = (lstListType.SelectedIndex == -1 ? "null" : lstListType.SelectedValue.ToString());
            newRow.clmListType    = lstListType.Text;
            newRow.clmFreeList    = txtFreeListId.Text;

            dgvProperities.Items.Add(newRow);



            txtArName.Text            = "";
            txtEnName.Text            = "";
            txtPROPERITY_NOTE.Text    = "";
            lstListType.SelectedIndex = -1;
            lstListType.Text          = "";
            txtFreeListId.Text        = "";
        }
        private void GetProperitiesData()
        {
            dgvProperities.Items.Clear();
            ConnectionToMySQL cnn    = new ConnectionToMySQL();
            DataTable         dtPorp = cnn.GetDataTable("select pkid, control_type, en_name, ar_name, " +
                                                        "  list_id, (select l.list_name from list_type l where l.pkid = list_id) listtype, " +
                                                        " free_list_name, properity_note " +
                                                        " from forms_de " +
                                                        "  where header_id = " + txtSwid.Text);

            clsGrid newRow;

            for (int i = 0; i < dtPorp.Rows.Count; i++)
            {
                newRow = new clsGrid();

                newRow.clmSwid        = dtPorp.Rows[i]["pkid"].ToString();
                newRow.clmFieldType   = dtPorp.Rows[i]["control_type"].ToString();
                newRow.clmFieldNameEn = dtPorp.Rows[i]["en_name"].ToString();
                newRow.clmFieldNameAr = dtPorp.Rows[i]["ar_name"].ToString();
                newRow.clmNote        = dtPorp.Rows[i]["properity_note"].ToString();
                newRow.clmListTypeId  = dtPorp.Rows[i]["list_id"].ToString();
                newRow.clmListType    = dtPorp.Rows[i]["listtype"].ToString();
                newRow.clmFreeList    = dtPorp.Rows[i]["free_list_name"].ToString();

                dgvProperities.Items.Add(newRow);
            }
        }
        public bool LlenarGridVehiculosDisponibles()
        {
            if (grdInformeVehiculos == null)
            {
                error = "No definió el grid del informe de vehiculos";
                return(false);
            }
            SQL = "SP_Consultar_Vehiculos_Disponibles";
            clsGrid oGrid = new clsGrid();

            oGrid.SQL          = SQL;
            oGrid.gridGenerico = grdInformeVehiculos;
            oGrid.AgregarParametro("@parametro_busqueda", parametroBusqueda);
            oGrid.StoredProcedure = true;
            if (oGrid.LlenarGridWeb())
            {
                grdInformeVehiculos = oGrid.gridGenerico;
                oGrid = null;
                return(true);
            }
            else
            {
                error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
Exemple #9
0
        public bool LlenarGrid()
        {
            if (grdRepuesto == null)
            {
                error = "No definió el grid del repuesto";
                return(false);
            }
            SQL = "Repuesto_LlenarGrid";
            clsGrid oGrid = new clsGrid();

            oGrid.SQL             = SQL;
            oGrid.gridGenerico    = grdRepuesto;
            oGrid.StoredProcedure = true;
            if (oGrid.LlenarGridWeb())
            {
                grdRepuesto = oGrid.gridGenerico;
                oGrid       = null;
                return(true);
            }
            else
            {
                error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
        public bool LlenarCabOrd()
        {
            if (gvCabOrd == null)
            {
                strError = "NO se asignó GridView a poblar";
                return(false);
            }

            objGrid = new clsGrid();

            objGrid.gsSql      = "CABPEDIDOS_S";
            objGrid.gsNomTabla = "Cabecera";
            objGrid.gsGvGen    = gvCabOrd;

            if (!objGrid.LlenarGridWeb())
            {
                strError = objGrid.gError;
                objGrid  = null;
                return(false);
            }

            gvCabOrd = objGrid.gsGvGen;

            objGrid = null;
            return(true);
        }
Exemple #11
0
        public bool LlenarGrid(string Cedula)
        {
            SQL = "SELECT dbo.TBL_TURNO.TIPO_TURNO, dbo.TBL_TURNO.FECHA_INICIO, dbo.TBL_TURNO.FECHA_FIN, " +
                  " dbo.TBL_OPERARIO.NOMBRE_COMPLETO, dbo.TBL_OPERARIO.CC " +
                  " FROM dbo.TBL_TURNO INNER JOIN" +
                  " dbo.TBL_OPERARIO ON dbo.TBL_TURNO.ID_OPERARIO = dbo.TBL_OPERARIO.ID_OPERARIO " +
                  " WHERE (dbo.TBL_TURNO.FECHA_INICIO between '" + FechaInicio + "' and '" + FechaFin + "') AND (dbo.TBL_OPERARIO.CC = '" + Cedula + "');";

            clsGrid oGrid = new clsGrid();

            oGrid.SQL = SQL;
            //oGrid.AgregarParametro("@prFactura", NumeroFactura);
            oGrid.gridGenerico = grid;
            //oGrid.NombreTabla = "Factura";
            if (oGrid.LlenarGridWeb())
            {
                grid  = oGrid.gridGenerico;
                oGrid = null;
                return(true);
            }
            else
            {
                Error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
        public bool LlenarGrid()
        {
            if (grdInformeVehiculos == null)
            {
                error = "No definió el grid del informe de vehiculos";
                return(false);
            }
            SQL = "SP_Consultar_vehiculo";
            clsGrid oGrid = new clsGrid();

            oGrid.SQL             = SQL;
            oGrid.gridGenerico    = grdInformeVehiculos;
            oGrid.StoredProcedure = true;
            if (oGrid.LlenarGridWeb())
            {
                grdInformeVehiculos = oGrid.gridGenerico;
                oGrid = null;
                return(true);
            }
            else
            {
                error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
        public bool LlenarGrIdProducto()
        {
            if (gvProducto == null)
            {
                strError = "NO se asignó GridView a poblar";
                return(false);
            }

            objGrid = new clsGrid();

            objGrid.gsSql      = "sp_Producto";
            objGrid.gsNomTabla = "Productos";
            objGrid.gsGvGen    = gvProducto;

            if (!objGrid.LlenarGridWeb())
            {
                strError = objGrid.gError;
                objGrid  = null;
                return(false);
            }

            gvProducto = objGrid.gsGvGen;

            objGrid = null;
            return(true);
        }
        public bool LlenarGridCliente()
        {
            if (gvCliente == null)
            {
                strError = "NO se asignó GridView a poblar";
                return(false);
            }

            objGrid = new clsGrid();

            objGrid.gsSql      = "sp_Empleado";
            objGrid.gsNomTabla = "Clientes";
            objGrid.gsGvGen    = gvCliente;

            if (!objGrid.LlenarGridWeb())
            {
                strError = objGrid.gError;
                objGrid  = null;
                return(false);
            }

            gvCliente = objGrid.gsGvGen;

            objGrid = null;
            return(true);
        }
        public void ListFormGenerate(string tableName, bool blank, DataTable dt, string inputDirectroy, string outputDirectroy)
        {
            clsFindReplace fr = new clsFindReplace();

            string inclassfile     = inputDirectroy + "\\" + templateListclassname + ".cs";
            string outclassfile    = outputDirectroy + "\\" + tableName + "_Lst" + ".cs";
            string indesignerfile  = inputDirectroy + "\\" + templateListclassname + ".Designer.cs";
            string outdesignerfile = outputDirectroy + "\\" + tableName + "_Lst" + ".Designer.cs";
            string inresourcefile  = inputDirectroy + "\\" + templateListclassname + ".resx";
            string outresourcefile = outputDirectroy + "\\" + tableName + "_Lst" + ".resx";
            string genstring       = "";

            fr.findReplace(inclassfile, outclassfile, templateListclassname, tableName + "_Lst");
            fr.findReplace(indesignerfile, outdesignerfile, templateListclassname, tableName + "_Lst");
            fr.findReplace(inresourcefile, outresourcefile, templateListclassname, tableName + "_Lst");
            fr.findReplace(outclassfile, outclassfile, templateEntryclassname, tableName + "_Ent");
            if (!blank)
            {
                clsgridDeclare  grideclare = new clsgridDeclare();
                clsGrid         grid       = new clsGrid();
                clsGridAddRange gridrange  = new clsGridAddRange();
                string          gridCode   = null;

                gridCode  = grid.gencreate(dt) + gridrange.gencreate(dt) + "}" + grideclare.gencreate(dt);
                genstring = (new clsListing()).gencreate(dt);
                fr.findReplace(outclassfile, outclassfile, "//<Listing>", "//<Listing>\n" + genstring);
                fr.findReplace(outdesignerfile, outdesignerfile, "}//<Control>", gridCode);
                //for extra text
                fr.findReplace(outdesignerfile, outdesignerfile, "TextExtraValue", grid.table.text + " List");
            }
        }
Exemple #16
0
        public bool LlenarGrid(string fecha_inicial, string fecha_final)
        {
            SQL = "SELECT dbo.TBL_VEHICULO.ID_VEHICULO, dbo.TBL_VEHICULO.COLOR, dbo.TBL_VEHICULO.MARCA, " +
                  " dbo.TBL_VEHICULO.PLACA, dbo.TBL_VEHICULO.MODELO, dbo.TBL_CLIENTE.NOMBRE_COMPLETO, " +
                  " dbo.TBL_RESERVA.FECHA_LLEGADA " +
                  " FROM  dbo.TBL_VEHICULO INNER JOIN" +
                  " dbo.TBL_CLIENTE ON dbo.TBL_VEHICULO.ID_CLIENTE = dbo.TBL_CLIENTE.ID_CLIENTE INNER JOIN " +
                  " dbo.TBL_RESERVA ON dbo.TBL_CLIENTE.ID_CLIENTE = dbo.TBL_RESERVA.ID_CLIENTE where FECHA_LLEGADA between'" + fecha_inicial + "' and '" + fecha_final + "'";

            clsGrid oGrid = new clsGrid();

            oGrid.SQL = SQL;
            //oGrid.AgregarParametro("@prFactura", NumeroFactura);
            oGrid.gridGenerico = grid;
            //oGrid.NombreTabla = "Factura";
            if (oGrid.LlenarGridWeb())
            {
                grid  = oGrid.gridGenerico;
                oGrid = null;
                return(true);
            }
            else
            {
                Error = oGrid.Error;
                oGrid = null;
                return(false);
            }
        }
Exemple #17
0
        private void GetFormData()
        {
            dgvForms.Items.Clear();
            ConnectionToMySQL cnn = new ConnectionToMySQL();

            System.Data.DataTable dtUsers = cnn.GetDataTable("select pkid,ar_name,en_name from forms_hd  " +
                                                             " where ar_name like '%" + txtFormAr.Text + "%' and en_name like '%" + txtFormEn.Text + "%' ");

            clsGrid newRow;

            for (int i = 0; i < dtUsers.Rows.Count; i++)
            {
                newRow           = new clsGrid();
                newRow.clmPkid   = dtUsers.Rows[i]["pkid"].ToString();
                newRow.clmFormAr = dtUsers.Rows[i]["ar_name"].ToString();
                newRow.clmFormEn = dtUsers.Rows[i]["en_name"].ToString();

                dgvForms.Items.Add(newRow);
            }
        }
Exemple #18
0
        public bool LlenarGrid()
        {
            if (objGrdReservas == null)
            {
                strError = "No definió el grid de Reservas";
                return(false);
            }

            strSQL = "SELECT     Promocion.Nombre AS Promocion, Implementos.Nombre AS Implementos, Servicio.Nombre AS Servicio, Tarifa.Nombre AS Tarifa, Tarifa.Valor AS ValorTarifa, " +
                     " Cliente.strDocumento_CLIE AS Cliente, Reservas.FechaIngreso AS Ingreso, Reservas.FechaSalida AS Salida, Cabaña.Nombre AS Cabaña " +
                     " FROM         Cabaña LEFT OUTER JOIN " +
                     " Tarifa ON Cabaña.IdTarifa = Tarifa.IdTarifa LEFT OUTER JOIN " +
                     " Promocion ON Cabaña.IdCabaña = Promocion.IdCabaña LEFT OUTER JOIN " +
                     " Servicio ON Cabaña.IdServicio = Servicio.IdServicio LEFT OUTER JOIN " +
                     " Implementos ON Cabaña.IdImplementos = Implementos.IdImplementos RIGHT OUTER JOIN " +
                     " Reservas ON Cabaña.IdCabaña = Reservas.IdCabaña LEFT OUTER JOIN " +
                     " Empleado ON Reservas.IdEmpleado = Empleado.strDocumento_EMPL LEFT OUTER JOIN " +
                     "  Cliente ON Reservas.IdCliente = Cliente.strDocumento_CLIE " +
                     "WHERE				dbo.Reservas.IdCliente = "+ strDocumento;

            //Se crea el objeto de grid y se le pasan las propiedades gridview, sql y nombre tabla
            clsGrid oGrid = new clsGrid();

            oGrid.gridGenerico = objGrdReservas;
            oGrid.SQL          = strSQL;
            oGrid.NombreTabla  = "Reserva";

            if (oGrid.LlenarGridWeb())
            {
                objGrdReservas = oGrid.gridGenerico;
                oGrid          = null;
                return(true);
            }
            else
            {
                strError = oGrid.Error;
                oGrid    = null;
                return(false);
            }
        }