Esempio n. 1
0
        public void CRE_Forma_Pago(SqlCommand comando, MOD_Forma_Pago obj)
        {
            try
            {
                string sp = "SP_CRE_Forma_Pago";

                comando.CommandType = CommandType.StoredProcedure;
                comando.CommandText = sp;
                comando.Parameters.Clear();

                comando.Parameters.Add(new SqlParameter("@FPA_ID_FORMA_PAGO", SqlDbType.Int));
                comando.Parameters.Add(new SqlParameter("@FPA_ID_CENTRO_ATENCION", SqlDbType.Int));
                comando.Parameters.Add(new SqlParameter("@FPA_DESCRIPCION", SqlDbType.VarChar));

                comando.Parameters[0].Value = obj.FPA_id_forma_pago;
                comando.Parameters[1].Value = obj.FPA_id_centro_atencion;
                comando.Parameters[2].Value = obj.FPA_descripcion;

                comando.ExecuteNonQuery();
            }
            catch (Exception exc)
            {

                throw exc;
            }
        }
Esempio n. 2
0
 public void UPD_Forma_Pago(MOD_Forma_Pago obj)
 {
     try
     {
         this.IniciarTransaccion();
         AD_Forma_Pago objForma_Pago = new AD_Forma_Pago();
         objForma_Pago.UPD_Forma_Pago(this.comando, obj);
         this.ConfirmarTransaccion();
     }
     catch (Exception exc)
     {
         this.DeshacerTransaccion();
         throw exc;
     }
 }
Esempio n. 3
0
        public MOD_Forma_Pago SEL_Grid_By_Id_Forma_Pago(SqlCommand comando, int codigo_Forma_Pago)
        {
            try
            {
                string sp = "SP_SEL_GRID_BY_ID_Forma_Pago";

                comando.CommandType = CommandType.StoredProcedure;
                comando.CommandText = sp;
                comando.Parameters.Clear();

                comando.Parameters.Add(new SqlParameter("@FPA_ID_Forma_Pago", SqlDbType.Int));

                comando.Parameters[0].Value = codigo_Forma_Pago;

                IDataAdapter da = new SqlDataAdapter((SqlCommand)comando);
                DataSet ds = new DataSet();
                da.Fill(ds);

                DataTable dt = ds.Tables[0];
                MOD_Forma_Pago obj = new MOD_Forma_Pago();

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    obj.FPA_id_forma_pago = Convert.ToInt32(dt.Rows[i]["FPA_ID_Forma_Pago"]);
                    obj.FPA_id_centro_atencion = Convert.ToInt32(dt.Rows[i]["FPA_ID_CENTRO_ATENCION"]);
                    obj.FPA_descripcion = dt.Rows[i]["FPA_DESCRIPCION"].ToString();
                    obj.CEA_nombre = dt.Rows[i]["CEA_NOMBRE"].ToString();
                }

                return obj;
            }
            catch (Exception exc)
            {

                throw exc;
            }
        }
Esempio n. 4
0
        public List<MOD_Forma_Pago> SEL_Grid_Forma_Pago(SqlCommand comando, int Centro_Atencion, string buscar)
        {
            try
            {
                string sp = "SP_SEL_Grid_Forma_Pago";

                comando.CommandType = CommandType.StoredProcedure;
                comando.CommandText = sp;
                comando.Parameters.Clear();

                comando.Parameters.Add(new SqlParameter("@FPA_ID_CENTRO_ATENCION", SqlDbType.Int));
                comando.Parameters.Add(new SqlParameter("@BUSCAR", SqlDbType.VarChar));

                comando.Parameters[0].Value = Centro_Atencion;
                comando.Parameters[1].Value = buscar;

                IDataAdapter da = new SqlDataAdapter((SqlCommand)comando);
                DataSet ds = new DataSet();
                da.Fill(ds);

                DataTable dt = ds.Tables[0];
                List<MOD_Forma_Pago> lista = new List<MOD_Forma_Pago>();

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    MOD_Forma_Pago obj = new MOD_Forma_Pago();
                    obj.FPA_id_forma_pago = Convert.ToInt32(dt.Rows[i]["FPA_ID_Forma_Pago"]);
                    obj.FPA_id_centro_atencion = Convert.ToInt32(dt.Rows[i]["FPA_ID_CENTRO_ATENCION"]);
                    obj.FPA_descripcion = dt.Rows[i]["FPA_DESCRIPCION"].ToString();
                    obj.CEA_nombre = dt.Rows[i]["CEA_NOMBRE"].ToString();
                    lista.Add(obj);
                }

                return lista;
            }
            catch (Exception exc)
            {

                throw exc;
            }
        }
Esempio n. 5
0
        public Boolean CRE_Forma_Pago(MOD_Forma_Pago obj)
        {
            try
            {
                LOG_Forma_Pago Logica = new LOG_Forma_Pago();
                Logica.CRE_Forma_Pago(obj);
                return true;
            }
            catch (Exception )
            {
                return false;
                throw ;

            }
        }
Esempio n. 6
0
 public void UPD_Forma_Pago(MOD_Forma_Pago obj)
 {
     try
     {
         LOG_Forma_Pago Logica = new LOG_Forma_Pago();
         Logica.UPD_Forma_Pago(obj);
     }
     catch (Exception )
     {
         throw ;
     }
 }