コード例 #1
0
ファイル: CD_PresupUnv.cs プロジェクト: ProyectosSYSWEB/SIAF
        public void Insertar_PresupUnv(ref PresupUnv objPresup, ref string Verificador)
        {
            CD_Datos      CDDatos = new CD_Datos();
            OracleCommand Cmd     = null;

            try
            {
                String[] Parametros = { "P_TIPOPRES",   "P_DEPENDORIG", "P_DEP_ORIGEN", "P_REF_DOCTO",     "P_FECHA_DOC", "P_CONCEPTO", "P_AUTORIZADO", "P_MES", "P_TIPOOPER", "P_C_CONTAB", "P_DEPEND",
                                        "P_CODIGO_PRO", "P_FECHA_OPER", "P_ESTAT_REG",  "P_FECHA_CAPTURA", "P_FECHA_APL", "P_STAT_CONTAB" };
                object[] Valores = { objPresup.TipoPres, objPresup.DependOrig, objPresup.Dep_Origen, objPresup.Ref_Docto, objPresup.Fecha_Doc,        objPresup.Concepto,   objPresup.Autorizado,
                                     objPresup.Mes,      objPresup.TipoOper,   objPresup.C_Contab,   objPresup.Depend,    objPresup.Cod_Programatico, objPresup.Fecha_Oper, objPresup.Estat_Reg, objPresup.Fecha_Captura,objPresup.Fecha_Aplicacion,
                                     objPresup.Stat_Contab };
                String[] ParametrosOut = { "p_Bandera" };

                Cmd = CDDatos.GenerarOracleCommand("INS_REG_PRESUP", ref Verificador, Parametros, Valores, ParametrosOut);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            finally
            {
                CDDatos.LimpiarOracleCommand(ref Cmd);
            }
        }
コード例 #2
0
ファイル: CD_PresupUnv.cs プロジェクト: ProyectosSYSWEB/SIAF
        public void ObtenerConsecutivoTipoOperacion(ref PresupUnv objPresupUnv, ref string Verificador)
        {
            CD_Datos      CDDatos = new CD_Datos();
            OracleCommand Cmd     = null;

            try
            {
                string[] ParametrosIn  = { "P_TIPO_OPE", "P_EJERCICIO" };
                object[] Valores       = { objPresupUnv.TipoOper, objPresupUnv.Ejercicio };
                string[] ParametrosOut = { "P_ID", "p_bandera" };

                Cmd = CDDatos.GenerarOracleCommand("OBT_ULTIMO_CONSECUTIVO", ref Verificador, ParametrosIn, Valores, ParametrosOut);
                if (Verificador == "0")
                {
                    objPresupUnv    = new PresupUnv();
                    objPresupUnv.Id = Convert.ToInt32(Cmd.Parameters["P_ID"].Value);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            finally
            {
                CDDatos.LimpiarOracleCommand(ref Cmd);
            }
        }
コード例 #3
0
 protected void BTNGuardarPres_Click(object sender, EventArgs e)
 {
     try
     {
         if (SesionUsu.Usu_TipoUsu == "SA")
         {
             string    Verificador = string.Empty;
             string    Dependencia = txtDependencia.Text;
             PresupUnv objPresUnv  = new PresupUnv();
             objPresUnv.TipoPres         = DDLTipoRec.SelectedValue;
             objPresUnv.DependOrig       = "99999";               //Agregar
             objPresUnv.Dep_Origen       = txtNombDepOrigen.Text; // Agregar
             objPresUnv.Ref_Docto        = txtRefDocto.Text;
             objPresUnv.Fecha_Doc        = txtfechaDocumento.Text;
             objPresUnv.Concepto         = txtConcepto.Text;
             objPresUnv.Autorizado       = txtImporte.Text;
             objPresUnv.Mes              = txtMes.Text;
             objPresUnv.TipoOper         = DDLTipoOperacion.Text;
             objPresUnv.C_Contab         = DDLCentroContab.SelectedValue;
             objPresUnv.Depend           = Dependencia.Substring(0, 5);
             objPresUnv.Cod_Programatico = DDLCodProg.SelectedValue;
             objPresUnv.Fecha_Oper       = txtfechaDocumento.Text;
             objPresUnv.Fecha_Captura    = txtfechaDocumento.Text;
             objPresUnv.Fecha_Aplicacion = txtfechaDocumento.Text;
             objPresUnv.Stat_Contab      = "S";
             objPresUnv.Estat_Reg        = "A";
             objPresUnv.Estat_Oper       = "2";
             CN_PresupUnv.Insertar_PresupUnv(ref objPresUnv, ref Verificador);
             if (Verificador == "0")
             {
                 lblError.Text          = "Se guardo correctamente";
                 txtNombDepOrigen.Text  = "";
                 txtRefDocto.Text       = "";
                 txtfechaDocumento.Text = "";
                 txtConcepto.Text       = "";
                 txtImporte.Text        = "";
                 txtConsecutivoOpe.Text = "";
                 txtImporte.Text        = "";
                 ObtenerConsecutivoTipoOperacion("A");
             }
             else if (Verificador == "1")
             {
                 lblError.Text = "Este código ya existe";
             }
             else
             {
                 lblError.Text = Verificador;
             }
         }
         else
         {
             lblError.Text = "No tiene los privilegios para realizar esta acción";
         }
     }
     catch (Exception ex)
     {
         lblError.Text = ex.Message;
     }
 }
コード例 #4
0
 public void ObtenerConsecutivoTipoOperacion(ref PresupUnv objPresupUnv, ref string Verificador)
 {
     try
     {
         CD_PresupUnv CD_PresupUnv = new CD_PresupUnv();
         CD_PresupUnv.ObtenerConsecutivoTipoOperacion(ref objPresupUnv, ref Verificador);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
コード例 #5
0
 public void Insertar_PresupUnv(ref PresupUnv objPresUnv, ref string Verificador)
 {
     try
     {
         CD_PresupUnv CD_Presupunv = new CD_PresupUnv();
         CD_Presupunv.Insertar_PresupUnv(ref objPresUnv, ref Verificador);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
コード例 #6
0
 public void PresUnvGrid(ref PresupUnv objConsultas, ref List <PresupUnv> List)
 {
     try
     {
         CD_PresupUnv CD_Presupunv = new CD_PresupUnv();
         CD_Presupunv.PresUnvGrid(ref objConsultas, ref List);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
コード例 #7
0
 public void ObtenerDatosCodProg(ref PresupUnv objPresupUnv, ref string Verificador)
 {
     try
     {
         CD_PresupUnv CD_PresupUnv = new CD_PresupUnv();
         CD_PresupUnv.ObtenerDatosCodProg(ref objPresupUnv, ref Verificador);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
コード例 #8
0
 protected void GRDCargarDatosPresUnv()
 {
     try
     {
         PresupUnv        objPresupUnv = new PresupUnv();
         List <PresupUnv> listPresUnv  = new List <PresupUnv>();
         objPresupUnv.Ejercicio = SesionUsu.Usu_Ejercicio;
         CN_PresupUnv.PresUnvGrid(ref objPresupUnv, ref listPresUnv);
         //SqlDataAdapter sda = new SqlDataAdapter(cmd);
         //DataSet ds = new DataSet();
         //sda.Fill(ds);//
         GRDCodProg.DataSource = listPresUnv;
         GRDCodProg.DataBind();
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "modal", "mostrar_modal(0, '" + ex.Message + ".')", true);
     }
 }
コード例 #9
0
ファイル: CD_PresupUnv.cs プロジェクト: ProyectosSYSWEB/SIAF
        public void PresUnvGrid(ref PresupUnv objPresUnv, ref List <PresupUnv> List)
        {
            CD_Datos      CDDatos = new CD_Datos();
            OracleCommand cmm     = null;

            try
            {
                OracleDataReader dr         = null;
                String[]         Parametros = { "P_EJERCICIO" };
                String[]         Valores    = { objPresUnv.Ejercicio };

                cmm = CDDatos.GenerarOracleCommandCursor("PKG_PRESUPUESTO.Obt_Grid_Reg_Presup", ref dr, Parametros, Valores);

                while (dr.Read())
                {
                    objPresUnv                      = new PresupUnv();
                    objPresUnv.Id                   = Convert.ToInt32(dr.GetValue(0));
                    objPresUnv.Tipo_Gasto           = Convert.ToString(dr.GetValue(1));
                    objPresUnv.Dependencia          = Convert.ToString(dr.GetValue(2));
                    objPresUnv.Referencia_Documento = Convert.ToString(dr.GetValue(3));
                    objPresUnv.Concepto             = Convert.ToString(dr.GetValue(4));
                    objPresUnv.Codigo_Programatico  = Convert.ToString(dr.GetValue(5));
                    objPresUnv.Autorizado           = Convert.ToString(dr.GetValue(6));
                    objPresUnv.Tipo_Gasto_Param     = Convert.ToString(dr.GetValue(7));
                    List.Add(objPresUnv);
                }
                dr.Close();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            finally
            {
                CDDatos.LimpiarOracleCommand(ref cmm);
            }
        }
コード例 #10
0
ファイル: CD_PresupUnv.cs プロジェクト: ProyectosSYSWEB/SIAF
        public void ObtenerDatosCodProg(ref PresupUnv objPresupUnv, ref string Verificador)
        {
            CD_Datos      CDDatos = new CD_Datos();
            OracleCommand Cmd     = null;

            try
            {
                string[] ParametrosIn  = { "P_CODIGO_PROG" };
                object[] Valores       = { objPresupUnv.Codigo_Programatico };
                string[] ParametrosOut = { "P_CENTRO_CONTABLE", "P_DEPENDENCIA", "P_PROGRAMA", "P_SUBPROGRAMA", "P_PARTIDA", "P_FUENTE", "P_PROYECTO", "P_TIPO_GASTO", "P_DIG_MINISTRADO", "P_FUNCION", "p_bandera" };

                Cmd = CDDatos.GenerarOracleCommand("OBT_DESC_CTX_DP01", ref Verificador, ParametrosIn, Valores, ParametrosOut);
                if (Verificador == "0")
                {
                    objPresupUnv = new PresupUnv();
                    objPresupUnv.Centro_Contable = Convert.ToString(Cmd.Parameters["P_CENTRO_CONTABLE"].Value);
                    objPresupUnv.Dependencia     = Convert.ToString(Cmd.Parameters["P_DEPENDENCIA"].Value);
                    objPresupUnv.Programa        = Convert.ToString(Cmd.Parameters["P_PROGRAMA"].Value);
                    objPresupUnv.Subprograma     = Convert.ToString(Cmd.Parameters["P_SUBPROGRAMA"].Value);
                    objPresupUnv.Partida         = Convert.ToString(Cmd.Parameters["P_PARTIDA"].Value);
                    objPresupUnv.Fuente          = Convert.ToString(Cmd.Parameters["P_FUENTE"].Value);
                    objPresupUnv.Proyecto        = Convert.ToString(Cmd.Parameters["P_PROYECTO"].Value);
                    objPresupUnv.Tipo_Gasto      = Convert.ToString(Cmd.Parameters["P_TIPO_GASTO"].Value);
                    objPresupUnv.Dig_Ministrado  = Convert.ToString(Cmd.Parameters["P_DIG_MINISTRADO"].Value);
                    objPresupUnv.Funcion         = Convert.ToString(Cmd.Parameters["P_FUNCION"].Value);
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            finally
            {
                CDDatos.LimpiarOracleCommand(ref Cmd);
            }
        }