Exemple #1
0
 public bool InsertOrUpdate(bool opt, DigitalDetail_Object digitalDetailObject)
 {
     using (var db = new CarOnlineEntities())
     {
         var result = db.WEB_CARONLINE_SP_DigitalDetail_InsertOrUpdate(opt, digitalDetailObject.DigitalDetailId,
                                                                       digitalDetailObject.PostId, digitalDetailObject.DigitalCategoryId, digitalDetailObject.Applyed,
                                                                       digitalDetailObject.IsDeleted);
         return(result > 0);
     }
 }
        public ActionResult Edit(DigitalDetail_Object digitalDetailObject)
        {
            if (ModelState.IsValid)
            {
                var result = new DigitalDetail_BCL().InsertOrUpdate(true, digitalDetailObject);
                if (result)
                {
                    return(RedirectToAction("Index", "DigitalDetail"));
                }
                ModelState.AddModelError("", "Cập nhật không thành công !");
            }

            return(View(digitalDetailObject));
        }
Exemple #3
0
 public bool InsertOrUpdate(bool opt, DigitalDetail_Object digitalDetailObject)
 {
     return(new DigitalDetail_DAO().InsertOrUpdate(opt, digitalDetailObject));
 }