Exemple #1
0
        public static ReportClaimsVM SetSubData(ReportClaims data, Guid aid)
        {
            var model = ReportClaimsVM.MToVM(data);

            model.DateTime   = DateTimeStorageVM.MToVM(DateTimeStorageService.GetByID(data.DateTimeStorageID));
            model.ReportType = StatusTypesReferencesVM.MToVM(StatusTypesReferencesService.GetByID(data.ReportTypeID));
            return(model);
        }
Exemple #2
0
 public static bool Insert(Guid id, Guid uid, Guid suid, Guid rtid, string reason, Guid aid, Guid dtid)
 {
     try {
         using (var context = new CentralProcessContext()){
             var data = ReportClaimsVM.set(id, uid, suid, rtid, reason, aid, dtid);
             context.ReportClaimsDB.Add(data);
             context.SaveChanges();
             return(true);
         }
     } catch { return(false); }
 }