Exemplo n.º 1
0
 public credit_type find_credit_type_By_ID(int id)
 {
     try
     {
         credit_type = db.credit_types.SingleOrDefault(a => a.id == id);
         return(credit_type);
     }
     catch (Exception)
     {
         return(null);
     }
 }
Exemplo n.º 2
0
 public credit_type find_credit_type_By_AppId(string Appid)
 {
     try
     {
         credit_type = db.credit_types.SingleOrDefault(a => a.App_id == Appid);
         return(credit_type);
     }
     catch (Exception)
     {
         return(null);
     }
 }
Exemplo n.º 3
0
 public credit_type delete_credit_type()
 {
     try
     {
         credit_type prev_credit_type = db.credit_types.SingleOrDefault(a => a.id == credit_type.id);
         db.credit_types.DeleteOnSubmit(prev_credit_type);
         return(credit_type);
     }
     catch (Exception)
     {
         return(null);
     }
 }
Exemplo n.º 4
0
        public credit_type alter_credit_type()
        {
            try
            {
                credit_type prev_credit_type = db.credit_types.SingleOrDefault(a => a.id == credit_type.id);

                prev_credit_type.shop_credits = credit_type.shop_credits;
                prev_credit_type.description  = credit_type.description;
                prev_credit_type.name         = credit_type.name;


                db.SubmitChanges();
                return(credit_type);
            }
            catch (Exception)
            {
                return(null);
            }
        }
Exemplo n.º 5
0
 public credit_type_type_crud(credit_type credit_type_)
 {
     this.credit_type_ = credit_type_;
 }