Exemplo n.º 1
0
 public virtual int Delete(int id)
 {
     try
     {
         ORDER_DEADLINE user = this.GetById(id);
         return(this.Delete(user));
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Exemplo n.º 2
0
 public virtual void Remove(ORDER_DEADLINE user)
 {
     try
     {
         db.ORDER_DEADLINEs.DeleteOnSubmit(user);
         db.SubmitChanges();
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Exemplo n.º 3
0
 public virtual void Remove(int id)
 {
     try
     {
         ORDER_DEADLINE user = this.GetById(id);
         this.Remove(user);
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Exemplo n.º 4
0
 public virtual void Create(ORDER_DEADLINE user)
 {
     try
     {
         this.db.ORDER_DEADLINEs.InsertOnSubmit(user);
         db.SubmitChanges();
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Exemplo n.º 5
0
 public virtual void Update(ORDER_DEADLINE user)
 {
     try
     {
         ORDER_DEADLINE userOld = this.GetById(user.ID);
         userOld = user;
         db.SubmitChanges();
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Exemplo n.º 6
0
 public virtual int Delete(ORDER_DEADLINE user)
 {
     try
     {
         //user.IsDelete = true;
         db.SubmitChanges();
         return(0);
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Exemplo n.º 7
0
        protected void lbtnSaveDeadline_Click(object sender, EventArgs e)
        {
            try
            {
                var orderDeadline = new ORDER_DEADLINE();
                orderDeadline.ORDER_ID      = id;
                orderDeadline.DEADLINE_DATE = pickerAndCalendarDeadline.returnDate;
                orderDeadline.NOTE          = Utils.CStrDef(txtNoteDeadline.Text);
                orderDeadline.STATUS        = 0;
                _OrderDeadlineRepo.Create(orderDeadline);

                Response.Redirect("chi-tiet-don-hang.aspx?id=" + id + "&activetab=" + 2);
            }
            catch
            {
            }
        }