public VdText(double x, double y, int owner, int shapeId, CleanupRequest cleanupRequest) : base(owner, shapeId) { initText(DaoUtils.UserIdToColor(owner)); _cleanupRequest = cleanupRequest; HandleMove(x, y); RemoveFocus(); }
public VdText(double x, double y, int owner, int shapeId, CleanupRequest cleanupRequest) : base(owner, shapeId) { initText(DaoUtils.UserIdToColor(owner)); _cleanupRequest = cleanupRequest; HandleMove(x,y); RemoveFocus(); }
public ActionResult SaveCleanupRequest(CleanupRequest data) { data.UserId = (int)Session["UserId"]; data.BranchId = 1; data.AddedOn = DateTime.Now; data.Approval = false; data.Status = true; db.CleanupRequests.Add(data); db.SaveChanges(); return(RedirectToAction("CleanupRequest", new { })); }
public ActionResult ApproveConfirmation(int?id) { // CleanupRequest obj = db.CleanupRequests.Find(id); if (obj != null && obj.Approval == true) { obj.Status = false; UpdateModel(obj); db.SaveChanges(); } else { return(Content("Task Not Approved")); } return(Content("Task Completed")); }
public ActionResult ApproveCleanup(int?id) { // id = db.AmbulanceMasters.Where(e => e.Engaged == false); CleanupRequest obj = db.CleanupRequests.Find(id); if (obj != null) { obj.Approval = true; UpdateModel(obj); // db.AmbulanceMasters.Add(obj); db.SaveChanges(); } else { return(Content("Not such an object")); } return(Content("Request Approved")); }
public async Task <TransactionCleanupAttempt> ProcessCleanupRequest(CleanupRequest cleanupRequest, bool isRegular = true) { if (string.IsNullOrEmpty(cleanupRequest.AtrId)) { throw new ArgumentNullException(nameof(cleanupRequest.AtrId)); } _logger.LogDebug("Cleaner.{creator}: Processing cleanup request: {req}", _creatorName, cleanupRequest); try { await Forwards.ForwardCompatibility.Check(null, Forwards.ForwardCompatibility.CleanupEntry, cleanupRequest.ForwardCompatibility).CAF(); await CleanupDocs(cleanupRequest).CAF(); await CleanupAtrEntry(cleanupRequest).CAF(); return(new TransactionCleanupAttempt( Success: true, IsRegular: isRegular, AttemptId: cleanupRequest.AttemptId, AtrId: cleanupRequest.AtrId, AtrBucketName: cleanupRequest.AtrCollection.Scope.Bucket.Name, AtrCollectionName: cleanupRequest.AtrCollection.Name, AtrScopeName: cleanupRequest.AtrCollection.Scope.Name, Request: cleanupRequest, FailureReason: null)); } catch (Exception ex) { _logger.LogDebug("Cleaner.{creator}: Cleanup Failed for {req}! Reason: {ex}", _creatorName, cleanupRequest, ex); // TODO: publish stream of failed cleanups and their cause. return(new TransactionCleanupAttempt( Success: false, IsRegular: isRegular, AttemptId: cleanupRequest.AttemptId, AtrId: cleanupRequest.AtrId, AtrBucketName: cleanupRequest.AtrCollection.Scope.Bucket.Name, AtrCollectionName: cleanupRequest.AtrCollection.Name, AtrScopeName: cleanupRequest.AtrCollection.Scope.Name, Request: cleanupRequest, FailureReason: ex)); } }
public AnalysisRequest() { Cleanup = new CleanupRequest(); Entities = new EntitiesRequest(); Download = new DownloadRequest(); }
private Task CleanupDocs(CleanupRequest cleanupRequest) => cleanupRequest.State switch {