Пример #1
0
 public void UPD_Dueno(MOD_Dueno obj)
 {
     try
         {
             this.IniciarTransaccion();
             AD_Dueno objDueno = new AD_Dueno();
             objDueno.UPD_Dueno(this.comando, obj);
             this.ConfirmarTransaccion();
         }
         catch (Exception exc)
         {
             this.DeshacerTransaccion();
             throw exc;
         }
 }
Пример #2
0
        public void CRE_Dueno(SqlCommand comando, MOD_Dueno obj)
        {
            try
            {
                string sp = "SP_CRE_Dueno";

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

                comando.Parameters.Add(new SqlParameter("@DUE_NOMBRE", SqlDbType.VarChar));
                comando.Parameters.Add(new SqlParameter("@DUE_APELLIDO1", SqlDbType.VarChar));
                comando.Parameters.Add(new SqlParameter("@DUE_APELLIDO2", SqlDbType.VarChar));
                comando.Parameters.Add(new SqlParameter("@DUE_PAIS", SqlDbType.VarChar));
                comando.Parameters.Add(new SqlParameter("@DUE_CUIDAD", SqlDbType.VarChar));
                comando.Parameters.Add(new SqlParameter("@DUE_EMAIL", SqlDbType.VarChar));
                comando.Parameters.Add(new SqlParameter("@DUE_CODIGO_POSTAL", SqlDbType.VarChar));
                comando.Parameters.Add(new SqlParameter("@DUE_TELEFONO", SqlDbType.VarChar));
                comando.Parameters.Add(new SqlParameter("@DUE_CELULAR", SqlDbType.VarChar));

                comando.Parameters[0].Value = obj.DUE_nombre;
                comando.Parameters[1].Value = obj.DUE_apellido1;
                comando.Parameters[2].Value = obj.DUE_apellido2;
                comando.Parameters[3].Value = obj.DUE_pais;
                comando.Parameters[4].Value = obj.DUE_cuidad;
                comando.Parameters[5].Value = obj.DUE_email;
                comando.Parameters[6].Value = obj.DUE_codigo_postal;
                comando.Parameters[7].Value = obj.DUE_telefono;
                comando.Parameters[8].Value = obj.DUE_celular;

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

                throw exc;
            }
        }
Пример #3
0
        public MOD_Dueno SEL_Grid_By_Id_Dueno(SqlCommand comando, int codigo)
        {
            try
            {
                string sp = "SP_SEL_GRID_BY_ID_Dueno";

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

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

                comando.Parameters[0].Value = codigo;

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

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

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    obj.DUE_id_dueno = Convert.ToInt32(dt.Rows[i]["DUE_ID_DUENO"]);
                    obj.DUE_nombre = dt.Rows[i]["DUE_NOMBRE"].ToString();
                    obj.DUE_apellido1 = dt.Rows[i]["DUE_APELLIDO1"].ToString();
                    obj.DUE_apellido2 = dt.Rows[i]["DUE_APELLIDO2"].ToString();
                    obj.DUE_pais = dt.Rows[i]["DUE_PAIS"].ToString();
                    obj.DUE_cuidad = dt.Rows[i]["DUE_CUIDAD"].ToString();
                    obj.DUE_email = dt.Rows[i]["DUE_EMAIL"].ToString();
                    obj.DUE_codigo_postal = dt.Rows[i]["DUE_CODIGO_POSTAL"].ToString();
                    obj.DUE_telefono = dt.Rows[i]["DUE_TELEFONO"].ToString();
                    obj.DUE_celular = dt.Rows[i]["DUE_CELULAR"].ToString();
                }

                return obj;
            }
            catch (Exception exc)
            {

                throw exc;
            }
        }
Пример #4
0
 public void UPD_Dueno(MOD_Dueno obj)
 {
     try
     {
         LOG_Dueno Logica = new LOG_Dueno();
         Logica.UPD_Dueno(obj);
     }
     catch (Exception )
     {
         throw ;
     }
 }
Пример #5
0
        public Boolean CRE_Dueno(MOD_Dueno obj)
        {
            try
            {
                LOG_Dueno Logica = new LOG_Dueno();
                Logica.CRE_Dueno(obj);
                return true;
            }
            catch (Exception )
            {
                return false;
                throw ;

            }
        }