Exemple #1
0
        public JsonResult deletesnapshot(int intsysid)
        {
            Master_Snapshot_Config data = db.Master_Snapshot_Config.Where(x => x.Sysid == intsysid).SingleOrDefault();

            if (data != null)
            {
                db.Master_Snapshot_Config.Remove(data);
                db.SaveChanges();
            }
            return(Json("", JsonRequestBehavior.AllowGet));
        }
Exemple #2
0
        public JsonResult update_snapshot(int intFisYear, string strTitle, string strDesc, string strDate, int intsysid)
        {
            Master_Snapshot_Config row = db.Master_Snapshot_Config.Where(x => x.Sysid == intsysid).SingleOrDefault();

            row.FisYear           = intFisYear;
            row.Title             = strTitle;
            row.Description       = strDesc;
            row.Date              = Convert.ToDateTime(strDate);
            row.DataRefreshStatus = "updating....";
            db.SaveChanges();
            update_snapshot(Convert.ToDateTime(strDate), intsysid);
            return(Json("", JsonRequestBehavior.AllowGet));
        }
Exemple #3
0
        public JsonResult insert_snapshot(int intFisYear, string strTitle, string strDesc, string strDate)
        {
            Master_Snapshot_Config obj = new Master_Snapshot_Config();

            obj.FisYear           = intFisYear;
            obj.Title             = strTitle;
            obj.Description       = strDesc;
            obj.Date              = Convert.ToDateTime(strDate);
            obj.DataRefreshStatus = "updating....";
            db.Master_Snapshot_Config.Add(obj);
            db.SaveChanges();
            update_snapshot(Convert.ToDateTime(strDate), obj.Sysid);
            return(Json("", JsonRequestBehavior.AllowGet));
        }