Example #1
0
 public void CRE_Dueno_Mascota(MOD_Dueno_Mascota obj)
 {
     try
     {
         this.IniciarTransaccion();
         AD_Dueno_Mascota objDueno_Mascota = new AD_Dueno_Mascota();
         objDueno_Mascota.CRE_Dueno_Mascota(this.comando, obj);
         this.ConfirmarTransaccion();
     }
     catch (Exception exc)
     {
         this.DeshacerTransaccion();
         throw exc;
     }
 }
Example #2
0
        public void CRE_Dueno_Mascota(SqlCommand comando, MOD_Dueno_Mascota obj)
        {
            try
            {
                string sp = "SP_CRE_Dueno_Mascota";

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

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

                comando.Parameters[0].Value = obj.DXM_id_dueno;
                comando.Parameters[1].Value = obj.DXM_id_mascota;

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

                throw exc;
            }
        }
Example #3
0
        public MOD_Dueno_Mascota SEL_Grid_By_Id_Dueno_Mascota(SqlCommand comando, int codigo_dueno, int codigo_mascota)
        {
            try
            {
                string sp = "SP_SEL_GRID_BY_ID_Dueno_Mascota";

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

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

                comando.Parameters[0].Value = codigo_dueno;
                comando.Parameters[1].Value = codigo_mascota;

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

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

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    comando.Parameters.Add(new SqlParameter("@DXM_ID_DUENO", SqlDbType.Int));
                    comando.Parameters.Add(new SqlParameter("@DXM_ID_MASCOTA", SqlDbType.Int));
                }

                return obj;
            }
            catch (Exception exc)
            {

                throw exc;
            }
        }
Example #4
0
        public List<MOD_Dueno_Mascota> SEL_Grid_Dueno_Mascota(SqlCommand comando)
        {
            try
            {
                string sp = "SP_SEL_Grid_Dueno_Mascota";

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

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

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

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    MOD_Dueno_Mascota obj = new MOD_Dueno_Mascota();
                    obj.DXM_id_dueno = Convert.ToInt32(dt.Rows[i]["DXM_ID_DUENO"]);
                    obj.DXM_id_mascota = Convert.ToInt32(dt.Rows[i]["DXM_ID_MASCOTA"]);
                    lista.Add(obj);
                }

                return lista;
            }
            catch (Exception exc)
            {

                throw exc;
            }
        }
Example #5
0
        public Boolean CRE_Dueno_Mascota(MOD_Dueno_Mascota obj)
        {
            try
            {
                LOG_Dueno_Mascota Logica = new LOG_Dueno_Mascota();
                Logica.CRE_Dueno_Mascota(obj);
                return true;
            }
            catch (Exception )
            {
                return false;
                throw ;

            }
        }
Example #6
0
 public void UPD_Dueno_Mascota(MOD_Dueno_Mascota obj)
 {
     try
     {
         LOG_Dueno_Mascota Logica = new LOG_Dueno_Mascota();
         Logica.UPD_Dueno_Mascota(obj);
     }
     catch (Exception )
     {
         throw ;
     }
 }