protected override void Retrieve(DataRow oDataRow)
        {
            try
            {
                PropertyInit();

                switch (mintSelectFilter)
                {
                case SelectFilters.All:
                    VM.GestionId     = SysData.ToLong(oDataRow[clsGestionVM._GestionId]);
                    VM.GestionNro    = SysData.ToInteger(oDataRow[clsGestionVM._GestionNro]);
                    VM.GestionFecIni = SysData.ToDate(oDataRow[clsGestionVM._GestionFecIni]);
                    VM.GestionFecFin = SysData.ToDate(oDataRow[clsGestionVM._GestionFecFin]);
                    VM.EstadoId      = SysData.ToLong(oDataRow[clsGestionVM._EstadoId]);

                    break;

                case SelectFilters.ListBox:


                    break;
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }
        }
Example #2
0
        //---------------------

        private void DataMove(clsGestionVM oGestionVM, clsGestion oGestion, bool boolEditing)
        {
            if (boolEditing)
            {
                oGestion.VM.GestionId = SysData.ToLong(oGestionVM.GestionId);
            }

            oGestion.VM.GestionNro    = SysData.ToInteger(oGestionVM.GestionNro);
            oGestion.VM.GestionFecIni = SysData.ToDate(oGestionVM.GestionFecIni);
            oGestion.VM.GestionFecFin = SysData.ToDate(oGestionVM.GestionFecFin);
            oGestion.VM.EstadoId      = SysData.ToLong(oGestionVM.EstadoId);
        }
Example #3
0
 private void DataMoveCorrelativ(clsCorrelativo oCorrelativo, clsPrefijo oPrefijo, clsGestionVM oGestion)
 {
     oCorrelativo.DocId        = SysData.ToLong(oPrefijo.DocId);
     oCorrelativo.PrefijoId    = SysData.ToLong(oPrefijo.PrefijoId);
     oCorrelativo.GestionId    = SysData.ToLong(oGestion.GestionId);
     oCorrelativo.ModuloId     = SysData.ToLong(oPrefijo.ModuloId);
     oCorrelativo.AplicacionId = SysData.ToLong(oPrefijo.AplicacionId);
     oCorrelativo.CorreNroAct  = 0;
     oCorrelativo.CorreNroMax  = 99999;
     oCorrelativo.FecIni       = SysData.ToDate(oGestion.GestionFecIni);
     oCorrelativo.FecFin       = SysData.ToDate(oGestion.GestionFecFin);
 }
        //---------------

        private void DataMove(clsPeriodo oPeriodo, clsPeriodoVM oPeriodoVM, Boolean editing)
        {
            if (editing)
            {
                oPeriodo.VM.PeriodoId = SysData.ToLong(oPeriodoVM.PeriodoId);
            }

            oPeriodo.VM.GestionId     = SysData.ToLong(oPeriodoVM.GestionId);
            oPeriodo.VM.MesId         = SysData.ToLong(oPeriodoVM.MesId);
            oPeriodo.VM.PeriodoFecIni = SysData.ToDate(oPeriodoVM.PeriodoFecIni);
            oPeriodo.VM.PeriodoFecFin = SysData.ToDate(oPeriodoVM.PeriodoFecFin);
            oPeriodo.VM.EstadoId      = SysData.ToLong(oPeriodoVM.EstadoId);
        }
Example #5
0
        //-----------------------------------------------------

        private void DataMove(clsCorrelativo oCorrelativo, clsCorrelativoVM oCorrelativoVm, bool editing)
        {
            if (editing)
            {
                oCorrelativo.CorreId = oCorrelativoVm.CorreId;
            }
            oCorrelativo.PrefijoId    = SysData.ToLong(oCorrelativoVm.PrefijoId);
            oCorrelativo.GestionId    = SysData.ToLong(oCorrelativoVm.GestionId);
            oCorrelativo.ModuloId     = SysData.ToLong(oCorrelativoVm.ModuloId);
            oCorrelativo.AplicacionId = SysData.ToLong(oCorrelativoVm.AplicacionId);
            oCorrelativo.DocId        = SysData.ToLong(oCorrelativoVm.DocId);
            oCorrelativo.CorreNroAct  = SysData.ToInteger(oCorrelativoVm.CorreNroAct);
            oCorrelativo.CorreNroMax  = SysData.ToInteger(oCorrelativoVm.CorreNroMax);
            oCorrelativo.FecIni       = SysData.ToDate(oCorrelativoVm.FecIni);
            oCorrelativo.FecFin       = SysData.ToDate(oCorrelativo.FecFin);
        }
Example #6
0
        private object Correlativos()
        {
            clsCorrelativo          oCorrelativo   = new clsCorrelativo(clsAppInfo.Connection);
            List <clsCorrelativoVM> oCorrelativoVM = new List <clsCorrelativoVM>();

            try
            {
                oCorrelativo.SelectFilter  = clsCorrelativo.SelectFilters.Grid;
                oCorrelativo.WhereFilter   = clsCorrelativo.WhereFilters.Grid;
                oCorrelativo.OrderByFilter = clsCorrelativo.OrderByFilters.Grid;

                if (oCorrelativo.Open())
                {
                    foreach (DataRow dr in oCorrelativo.DataSet.Tables[oCorrelativo.TableName].Rows)
                    {
                        oCorrelativoVM.Add(new clsCorrelativoVM()
                        {
                            CorreId       = SysData.ToLong(dr["CorreId"]),
                            PrefijoId     = SysData.ToLong(dr["PrefijoId"]),
                            PrefijoDes    = SysData.ToStr(dr["PrefijoDes"]),
                            DocId         = SysData.ToLong(dr["DocId"]),
                            DocDes        = SysData.ToStr(dr["DocDes"]),
                            ModuloId      = SysData.ToLong(dr["ModuloId"]),
                            ModuloDes     = SysData.ToStr(dr["ModuloDes"]),
                            AplicacionId  = SysData.ToLong(dr["AplicacionId"]),
                            AplicacionDes = SysData.ToStr(dr["AplicacionDes"]),
                            CorreNroAct   = SysData.ToInteger(dr["CorreNroAct"]),
                            CorreNroMax   = SysData.ToInteger(dr["CorreNroMax"]),
                            FecIni        = SysData.ToDate(dr["CorreFecIni"]),
                            FecFin        = SysData.ToDate(dr["CorreFecFin"]),
                            GestionNro    = SysData.ToInteger(dr["GestionNro"])
                        });
                    }
                }

                return(oCorrelativoVM);
            }
            catch (Exception exp)
            {
                throw exp;
            }
            finally
            {
                oCorrelativo.Dispose();
            }
            return(oCorrelativoVM);
        }
Example #7
0
        private clsCorrelativoVM CorrelativoFind(int correlativoId)
        {
            clsCorrelativo oCorrelativo = new clsCorrelativo(clsAppInfo.Connection);

            clsCorrelativoVM oCorrelativoVm = new clsCorrelativoVM();

            try
            {
                oCorrelativo.SelectFilter = clsCorrelativo.SelectFilters.All;
                oCorrelativo.WhereFilter  = clsCorrelativo.WhereFilters.Details;
                oCorrelativo.CorreId      = correlativoId;

                if (oCorrelativo.Open())
                {
                    DataRow dr = oCorrelativo.DataSet.Tables[oCorrelativo.TableName].Rows[0];

                    oCorrelativoVm.CorreId       = SysData.ToLong(dr["CorreId"]);
                    oCorrelativoVm.PrefijoId     = SysData.ToInteger(dr["PrefijoId"]);
                    oCorrelativoVm.PrefijoNro    = SysData.ToInteger(dr["PrefijoNro"]);
                    oCorrelativoVm.PrefijoDes    = SysData.ToStr(dr["PrefijoDes"]);
                    oCorrelativoVm.DocId         = SysData.ToLong(dr["DocId"]);
                    oCorrelativoVm.DocDes        = SysData.ToStr(dr["DocDes"]);
                    oCorrelativoVm.ModuloId      = SysData.ToLong(dr["ModuloId"]);
                    oCorrelativoVm.ModuloDes     = SysData.ToStr(dr["ModuloDes"]);
                    oCorrelativoVm.AplicacionId  = SysData.ToLong(dr["AplicacionId"]);
                    oCorrelativoVm.AplicacionDes = SysData.ToStr(dr["AplicacionDes"]);
                    oCorrelativoVm.CorreNroAct   = SysData.ToInteger(dr["CorreNroAct"]);
                    oCorrelativoVm.CorreNroMax   = SysData.ToInteger(dr["CorreNroMax"]);
                    oCorrelativoVm.FecIni        = SysData.ToDate(dr["CorreFecIni"]);
                    oCorrelativoVm.FecFin        = SysData.ToDate(dr["CorreFecFin"]);
                    oCorrelativoVm.GestionNro    = SysData.ToInteger(dr["GestionNro"]);

                    return(oCorrelativoVm);
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            finally {
                oCorrelativo.Dispose();
            }

            return(null);
        }
        private List <clsPeriodoVM> PeriodoList()
        {
            clsPeriodo          oPeriodo   = new clsPeriodo(clsAppInfo.Connection);
            List <clsPeriodoVM> oPeriodoVM = new List <clsPeriodoVM>();



            try
            {
                oPeriodo.SelectFilter  = clsPeriodo.SelectFilters.Grid;
                oPeriodo.WhereFilter   = clsPeriodo.WhereFilters.Grid;
                oPeriodo.OrderByFilter = clsPeriodo.OrderByFilters.Grid;

                if (oPeriodo.Open())
                {
                    foreach (DataRow dr in oPeriodo.DataSet.Tables[oPeriodo.TableName].Rows)
                    {
                        oPeriodoVM.Add(new clsPeriodoVM()
                        {
                            PeriodoId     = SysData.ToLong(dr[clsPeriodoVM._PeriodoId]),
                            GestionNro    = SysData.ToStr(dr[clsPeriodoVM._GestionNro]),
                            MesDes        = SysData.ToStr(dr[clsPeriodoVM._MesDes]),
                            PeriodoFecIni = SysData.ToDate(dr[clsPeriodoVM._PeriodoFecIni]),
                            PeriodoFecFin = SysData.ToDate(dr[clsPeriodoVM._PeriodoFecFin]),
                            EstadoDes     = SysData.ToStr(dr[clsPeriodoVM._EstadoDes])
                        });
                    }
                }

                return(oPeriodoVM);
            }
            catch (Exception exp)
            {
                throw exp;
            }
            finally
            {
                oPeriodo.Dispose();
            }
            return(oPeriodoVM);
        }
Example #9
0
        public List <clsGestionVM> GestionList()
        {
            clsGestion          oGestion   = new clsGestion(clsAppInfo.Connection);
            List <clsGestionVM> oGestionVM = new List <clsGestionVM>();



            try
            {
                oGestion.SelectFilter  = clsGestion.SelectFilters.Grid;
                oGestion.WhereFilter   = clsGestion.WhereFilters.Grid;
                oGestion.OrderByFilter = clsGestion.OrderByFilters.Grid;

                if (oGestion.Open())
                {
                    foreach (DataRow dr in oGestion.DataSet.Tables[oGestion.TableName].Rows)
                    {
                        oGestionVM.Add(new clsGestionVM()
                        {
                            GestionId     = SysData.ToLong(dr[clsGestionVM._GestionId]),
                            GestionNro    = SysData.ToInteger(dr[clsGestionVM._GestionNro]),
                            GestionFecIni = SysData.ToDate(dr[clsGestionVM._GestionFecIni]),
                            GestionFecFin = SysData.ToDate(dr[clsGestionVM._GestionFecFin]),
                            EstadoDes     = SysData.ToStr(dr[clsGestionVM._EstadoDes])
                        });
                    }
                }

                return(oGestionVM);
            }
            catch (Exception exp)
            {
                throw exp;
            }
            finally
            {
                oGestion.Dispose();
            }
            return(oGestionVM);
        }
Example #10
0
        public static List <clsGestionVM> GestionList()
        {
            clsGestion          oGestion   = new clsGestion(clsAppInfo.Connection);
            List <clsGestionVM> oGestionVM = new List <clsGestionVM>();



            try
            {
                DateTime date = DateTime.Today;
                oGestion.SelectFilter = clsGestion.SelectFilters.Grid;
                oGestion.WhereFilter  = clsGestion.WhereFilters.Grid;


                if (oGestion.Open())
                {
                    foreach (DataRow dr in oGestion.DataSet.Tables[oGestion.TableName].Rows)
                    {
                        oGestionVM.Add(new clsGestionVM()
                        {
                            GestionId     = SysData.ToLong(dr["GestionId"]),
                            GestionNro    = SysData.ToInteger(dr["GestionNro"]),
                            GestionFecIni = SysData.ToDate(dr["GestionFecIni"]),
                            GestionFecFin = SysData.ToDate(dr["GestionFecFin"])
                        });
                    }
                }

                return(oGestionVM);
            }
            catch (Exception exp)
            {
                throw exp;
            }
            finally
            {
                oGestion.Dispose();
            }
            return(oGestionVM);
        }
Example #11
0
        private List <clsPeriodoVM> PeriodoList(long gestionId)
        {
            clsPeriodo          oPeriodo = new clsPeriodo(clsAppInfo.Connection);
            List <clsPeriodoVM> periodos = new List <clsPeriodoVM>();

            try
            {
                oPeriodo.SelectFilter = clsPeriodo.SelectFilters.All;
                oPeriodo.WhereFilter  = clsPeriodo.WhereFilters.Gestion;
                oPeriodo.VM.GestionId = gestionId;

                if (oPeriodo.Open())
                {
                    foreach (DataRow dr in oPeriodo.DataSet.Tables[oPeriodo.TableName].Rows)
                    {
                        periodos.Add(new clsPeriodoVM()
                        {
                            PeriodoId     = SysData.ToLong(dr["PeriodoId"]),
                            GestionId     = SysData.ToInteger(dr["GestionId"]),
                            MesId         = SysData.ToLong(dr["MesId"]),
                            MesDes        = SysData.ToStr(dr["MesDes"]),
                            PeriodoFecIni = SysData.ToDate(dr["PeriodoFecIni"]),
                            PeriodoFecFin = SysData.ToDate(dr["PeriodoFecFin"]),
                            EstadoId      = SysData.ToLong(dr["EstadoId"])
                        });
                    }
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }
            finally
            {
                oPeriodo.Dispose();
            }
            return(periodos);
        }