public async Task <JsonResult> UUpdateProfileImage()
 {
     try {
         var id       = Guid.Parse(Request.Form["id"]);
         var profID   = Guid.Parse(Request.Form["profID"]);
         var userInfo = UsersService.GetByID(id);
         if (UsersService.Update(id, userInfo.Firstname, userInfo.Lastname, userInfo.MiddleName, userInfo.Address, userInfo.EmailAddress, userInfo.Password, userInfo.ContactNumber, userInfo.isAllowAccess, userInfo.ApplicationRegistered, profID, userInfo.DateTimeStorageID))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Profile Image")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
 public async Task <JsonResult> SRDUpdate()
 {
     try {
         var id   = Guid.Parse(Request.Form["id"]);
         var oid  = Guid.Parse(Request.Form["oid"]);
         var sid  = Guid.Parse(Request.Form["sid"]);
         var api  = Guid.Parse(Request.Form["aid"]);
         var dtid = Guid.Parse(Request.Form["dtid"]);
         if (SignalRDataService.Update(id, oid, api, sid, dtid))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Signal")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
 public async Task <JsonResult> QQAUpdate()
 {
     try {
         var id    = Guid.Parse(Request.Form["id"]);
         var desc  = Request.Form["desc"];
         var point = float.Parse(Request.Form["p"]);
         var ic    = Boolean.Parse(Request.Form["ic"]);
         var qqid  = Guid.Parse(Request.Form["qqid"]);
         if (QuizQuestionAnswerService.Update(id, qqid, desc, point, ic))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Choice")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
 public async Task <JsonResult> SIUpdate()
 {
     try {
         var id     = Guid.Parse(Request.Form["id"]);
         var sinput = Request.Form["input"];
         var oid    = Guid.Parse(Request.Form["oid"]);
         var dtid   = Guid.Parse(Request.Form["dtid"]);
         var api    = Guid.Parse(Request.Form["aid"]);
         if (SearchInputService.Update(id, sinput, oid, dtid, api))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Input")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
 public async Task <JsonResult> QTUpdate()
 {
     try {
         var id   = Guid.Parse(Request.Form["id"]);
         var qiid = Guid.Parse(Request.Form["qiid"]);
         var uid  = Guid.Parse(Request.Form["uid"]);
         var tp   = int.Parse(Request.Form["tp"]);
         var dtid = Guid.Parse(Request.Form["dtid"]);
         if (QuizTakerService.Update(id, qiid, uid, tp, dtid))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Takers")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
 public async Task <JsonResult> ELUpdate()
 {
     try {
         var id    = Guid.Parse(Request.Form["id"]);
         var name  = Request.Form["name"];
         var email = Request.Form["email"];
         var dtid  = Guid.Parse(Request.Form["dtid"]);
         var cnum  = Request.Form["cnum"];
         if (EmailListService.Update(id, name, email, dtid, cnum))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Email")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
Esempio n. 7
0
 public async Task <JsonResult> DSUpdate()
 {
     try {
         var id  = Guid.Parse(Request.Form["id"]);
         var oid = Guid.Parse(Request.Form["oid"]);
         var aid = Guid.Parse(Request.Form["aid"]);
         var ca  = DateTime.Parse(Request.Form["ca"]);
         var ua  = DateTime.Parse(Request.Form["ua"]);
         if (DateTimeStorageService.Update(id, oid, ua))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("DateTime")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
 public async Task <JsonResult> LSUpdate()
 {
     try {
         var id    = Guid.Parse(Request.Form["id"]);
         var oid   = Guid.Parse(Request.Form["oid"]);
         var longi = float.Parse(Request.Form["longi"]);
         var lat   = float.Parse(Request.Form["lat"]);
         var desc  = Request.Form["desc"];
         if (LocationStorageService.Update(id, oid, longi, lat, desc))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Location")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
Esempio n. 9
0
 public async Task <JsonResult> MCUpdate()
 {
     try {
         var id   = Guid.Parse(Request.Form["id"]);
         var text = Request.Form["text"];
         var rid  = Guid.Parse(Request.Form["rid"]);
         var dtid = Guid.Parse(Request.Form["dtid"]);
         var ia   = Boolean.Parse(Request.Form["ia"]);
         if (MessagingConversationService.Update(id, text, rid, dtid, ia))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Conversation")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
Esempio n. 10
0
 public async Task <JsonResult> SLUpdate()
 {
     try {
         var id   = Guid.Parse(Request.Form["id"]);
         var oid  = Guid.Parse(Request.Form["oid"]);
         var aid  = Guid.Parse(Request.Form["aid"]);
         var desc = Request.Form["desc"];
         var dtid = Guid.Parse(Request.Form["dtid"]);
         var ia   = Boolean.Parse(Request.Form["ia"]);
         if (SystemLogsService.Update(id, oid, aid, desc, dtid, ia))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Logs")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
Esempio n. 11
0
 public async Task <JsonResult> ILSUpdate()
 {
     try {
         var id     = Guid.Parse(Request.Form["id"]);
         var oid    = Guid.Parse(Request.Form["oid"]);
         var aid    = Guid.Parse(Request.Form["aid"]);
         var source = Request.Form["source"];
         var dtid   = Guid.Parse(Request.Form["dtid"]);
         var ia     = Boolean.Parse(Request.Form["ia"]);
         if (ImageLinkStorageService.Update(id, oid, aid, source, dtid, ia))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Image")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
 public async Task <JsonResult> GDUpdate()
 {
     try {
         var id    = Guid.Parse(Request.Form["id"]);
         var oid   = Guid.Parse(Request.Form["oid"]);
         var aid   = Guid.Parse(Request.Form["aid"]);
         var sid   = Guid.Parse(Request.Form["sid"]);
         var order = int.Parse(Request.Form["order"]);
         var ia    = Boolean.Parse(Request.Form["ia"]);
         if (GroupingsDataService.Update(id, oid, aid, sid, order, ia))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
 public async Task <JsonResult> QUAUpdate()
 {
     try {
         var id   = Guid.Parse(Request.Form["id"]);
         var qtid = Guid.Parse(Request.Form["qtid"]);
         var qqid = Guid.Parse(Request.Form["qqid"]);
         var qaid = Guid.Parse(Request.Form["qaid"]);
         var oa   = Request.Form["oa"];
         var pe   = float.Parse(Request.Form["pe"]);
         if (QuizUserAnswerService.Update(id, qtid, qqid, qaid, oa, pe))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Answer")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
Esempio n. 14
0
 public async Task <JsonResult> STUpdate()
 {
     try {
         var id       = Guid.Parse(Request.Form["id"]);
         var aid      = Guid.Parse(Request.Form["aid"]);
         var oid      = Guid.Parse(Request.Form["oid"]);
         var name     = Request.Form["name"];
         var desc     = Request.Form["desc"];
         var category = Guid.Parse(Request.Form["cid"]);
         if (StatusTypesReferencesService.Update(id, aid, oid, name, desc, category))
         {
             return(Success(id.ToString()));
         }
         return(Success(MessageUtilityService.FailedUpdate("")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
Esempio n. 15
0
 public async Task <JsonResult> MRUpdate()
 {
     try {
         var id   = Guid.Parse(Request.Form["id"]);
         var oid  = Guid.Parse(Request.Form["oid"]);
         var aid  = Guid.Parse(Request.Form["aid"]);
         var name = Request.Form["name"];
         var dtid = Guid.Parse(Request.Form["dtid"]);
         var ia   = Boolean.Parse(Request.Form["ia"]);
         if (MessagingRoomService.Update(id, oid, aid, name, dtid, ia))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Room")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
Esempio n. 16
0
 public async Task <JsonResult> RSUpdate()
 {
     try {
         var id      = Guid.Parse(Request.Form["id"]);
         var aid     = Guid.Parse(Request.Form["aid"]);
         var title   = Request.Form["title"];
         var comment = Request.Form["comment"];
         var stars   = int.Parse(Request.Form["s"]);
         var dtid    = Guid.Parse(Request.Form["dtid"]);
         var ia      = Boolean.Parse(Request.Form["ia"]);
         if (ReviewStorageService.Update(id, aid, title, comment, stars, dtid, ia))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Review")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
Esempio n. 17
0
 public async Task <JsonResult> RCUpdate()
 {
     try {
         var id     = Guid.Parse(Request.Form["id"]);
         var uid    = Guid.Parse(Request.Form["uid"]);
         var suid   = Guid.Parse(Request.Form["suid"]);
         var rtid   = Guid.Parse(Request.Form["rtid"]);
         var reason = Request.Form["reason"];
         var dtid   = Guid.Parse(Request.Form["dtid"]);
         var aid    = Guid.Parse(Request.Form["aid"]);
         if (ReportClaimsService.Update(id, uid, suid, rtid, reason, dtid, aid))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Report")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
 public async Task <JsonResult> NMUpdate()
 {
     try {
         var id      = Guid.Parse(Request.Form["id"]);
         var title   = Request.Form["title"];
         var message = Request.Form["message"];
         var oid     = Guid.Parse(Request.Form["oid"]);
         var aid     = Guid.Parse(Request.Form["aid"]);
         var dtid    = Guid.Parse(Request.Form["dtid"]);
         var ir      = Boolean.Parse(Request.Form["ir"]);
         var ia      = Boolean.Parse(Request.Form["ia"]);
         if (NotificationManagerService.Update(id, oid, aid, title, message, dtid, ir, ia))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Notification")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
 public async Task <JsonResult> UUpdatePassword()
 {
     try {
         var id    = Guid.Parse(Request.Form["id"]);
         var npass = Request.Form["npass"];
         var email = Request.Form["email"];
         var pass  = Request.Form["pass"];
         if (UsersService.HasUserAccess(email, pass, superAdmin))
         {
             var userInfo = UsersService.GetByID(id);
             if (UsersService.Update(id, userInfo.Firstname, userInfo.Lastname, userInfo.MiddleName, userInfo.Address, userInfo.EmailAddress, UsersService.GenerateHashPassword(npass), userInfo.ContactNumber, userInfo.isAllowAccess, userInfo.ApplicationRegistered, userInfo.ProfileImageID, userInfo.DateTimeStorageID))
             {
                 return(Success(id.ToString()));
             }
         }
         return(Failed(MessageUtilityService.FailedUpdate("Password")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
        public async Task <JsonResult> ISUpdate()
        {
            try {
                var id     = Guid.Parse(Request.Form["id"]);
                var bcode  = Request.Form["bcode"];
                var iid    = Guid.Parse(Request.Form["iid"]);
                var ssid   = Guid.Parse(Request.Form["ssid"]);
                var dtid   = Guid.Parse(Request.Form["dtid"]);
                var sku    = Request.Form["sku"];
                var serNum = Request.Form["serNum"];
                var icid   = Guid.Parse(Request.Form["icid"]);

                if (IS_ItemStockService.Update(id, iid, bcode, ssid, dtid, sku, serNum, icid))
                {
                    return(Success(id.ToString()));
                }
                return(Failed(MessageUtilityService.FailedUpdate("Stock")));
            } catch { return(Failed(MessageUtilityService.ServerError())); }
        }
Esempio n. 21
0
 public async Task <JsonResult> MSUpdate()
 {
     try {
         var id   = Guid.Parse(Request.Form["id"]);
         var uid  = Guid.Parse(Request.Form["uid"]);
         var aid  = Guid.Parse(Request.Form["aid"]);
         var name = Request.Form["name"];
         var scid = Guid.Parse(Request.Form["scid"]);
         var sbid = Guid.Parse(Request.Form["sbid"]);
         var slid = Guid.Parse(Request.Form["slid"]);
         var ia   = Boolean.Parse(Request.Form["ia"]);
         var dtid = Guid.Parse(Request.Form["dtid"]);
         if (MyStoreService.Update(id, uid, aid, name, scid, sbid, slid, ia, dtid))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Store")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
 public async Task <JsonResult> IIUpdate()
 {
     try {
         var id       = Guid.Parse(Request.Form["id"]);
         var title    = Request.Form["title"];
         var desc     = Request.Form["desc"];
         var price    = float.Parse(Request.Form["price"]);
         var aid      = Guid.Parse(Request.Form["aid"]);
         var oid      = Guid.Parse(Request.Form["oid"]);
         var icid     = Guid.Parse(Request.Form["icid"]);
         var ic       = Boolean.Parse(Request.Form["ic"]);
         var quantity = int.Parse(Request.Form["q"]);
         var dtid     = Guid.Parse(Request.Form["dtid"]);
         if (IS_ItemService.Update(id, oid, aid, icid, title, desc, price, ic, quantity))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Item")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }
 public async Task <JsonResult> QIUpdate()
 {
     try {
         var id   = Guid.Parse(Request.Form["id"]);
         var name = Request.Form["name"];
         var oid  = Guid.Parse(Request.Form["oid"]);
         var aid  = Guid.Parse(Request.Form["aid"]);
         var qc   = Request.Form["qc"];
         var htl  = Boolean.Parse(Request.Form["htl"]);
         var sid  = Guid.Parse(Request.Form["sid"]);
         var qsid = Guid.Parse(Request.Form["qsid"]);
         var dtid = Guid.Parse(Request.Form["dtid"]);
         if (QuizInfoService.Update(id, aid, oid, name, qc, htl, sid, qsid, dtid))
         {
             return(Success(id.ToString()));
         }
         return(Failed(MessageUtilityService.FailedUpdate("Quiz")));
     }
     catch { return(Failed(MessageUtilityService.ServerError())); }
 }
 public async Task <JsonResult> UUpdateAccess()
 {
     try {
         var email = Request.Form["email"];
         var pass  = Request.Form["pass"];
         //super admin
         var uid    = Guid.Parse(Request.Form["uid"]);
         var access = Boolean.Parse(Request.Form["iaa"]);
         if (UsersService.HasUserAccess(email, pass, superAdmin))
         {
             var data = UsersService.GetByID(uid);
             if (UsersService.Update(data.ID, data.Firstname, data.Lastname, data.MiddleName, data.Address, data.EmailAddress, data.Password, data.ContactNumber, access, data.ApplicationRegistered, data.ProfileImageID, data.DateTimeStorageID))
             {
                 return(Success(uid.ToString()));
             }
             return(Failed(MessageUtilityService.FailedUpdate("User")));
         }
         return(Failed(MessageUtilityService.ContactAdmin("Modify Content")));
     } catch { return(Failed(MessageUtilityService.ServerError())); }
 }