예제 #1
0
 public JsonResult UpdateProfile(Organization newOrg)
 {
     try
     {
         if (newOrg != null)
         {
             CompanyProfile cp = new CompanyProfile(this.HttpContext);
             Organization org = OrganizationRepository.GetOrganization(cp.BranchId);
             newOrg.BranchId = org.BranchId;
             OrganizationService.Update(newOrg);
             return Json(new { error = false, data= newOrg }, JsonRequestBehavior.AllowGet);
         }
         return Json(new { error = true, message = "Gagal ubah profil perusahaan." }, JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         return Json(new { error = true, message = ex.Message }, JsonRequestBehavior.AllowGet);
     }
 }
예제 #2
0
 public void Update(Organization org)
 {
     _reportingRepository.Update<Organization>(org, new { BranchId = org.BranchId });
 }