Example #1
0
 public JsonResult XoaAnh(string ID)
 {
     using (Planner2Entities rrc_db = new Planner2.Models.Planner2Entities())
     {
         var data = rrc_db.SettingDatas.Where(v => v.KeyID == ID).FirstOrDefault();
         data.Value = "";
         rrc_db.SaveChanges();
         MvcApplication.ReloadSetting();
         return(Json("", JsonRequestBehavior.AllowGet));
     }
 }
Example #2
0
 public ActionResult UploadFILEBanner(string BannerID, HttpPostedFileBase File_Banner = null)
 {
     using (Planner2Entities rrc_db = new Planner2.Models.Planner2Entities())
     {
         var file = SubmitFile(new List <HttpPostedFileBase> {
             File_Banner
         });
         var data = rrc_db.SettingDatas.Where(v => v.KeyID == BannerID).FirstOrDefault();
         data.Value = file.FirstOrDefault();
         rrc_db.SaveChanges();
         MvcApplication.ReloadSetting();
         return(RedirectToAction("index"));
     }
 }