public bool getOldDataImportedStatus(int ReviewID) { ParagraphAction p = DB.Select().From <ParagraphAction>().Where(ParagraphAction.ReviewIDColumn.DisplayName).IsEqualTo(ReviewID) .ExecuteSingle <ParagraphAction>(); if (p != null) { if (p.CompletedDate != null) { if (p.CompletedDate.Equals(DateTime.Parse("2008-01-01"))) { return(true); } } } return(false); //return p.Completed; // int.Parse( DB.Select(ParagraphAction.CompletedColumn.DisplayName).From(ParagraphAction.Schema).Where( // ParagraphAction.ReviewIDColumn.DisplayName).IsEqualTo(ReviewID).ExecuteScalar().ToString()); }
public int SavePA(ParagraphAction pa) { return DB.Save(pa); }
public static int InsertParagraphActionForm(FormCollection collection) { IReviewRepository reviews = new ReviewRepository(); IGenericRepository generics = new GenericRepository(); ParagraphAction pa = new ParagraphAction(); int palibid = int.Parse(collection["PALibID"]); int reviewid = int.Parse(collection["ReviewID"]); pa.PALibID = palibid; pa.DateStarted = DateTime.Parse(collection["pda_started_date"].ToString()); pa.DeadlineDate = DateTime.Parse(collection["pda_deadline_date"].ToString()); pa.MeetingID = int.Parse(collection["meetings"]); pa.ReviewID = reviewid; //string concern = collection["concerns"].ToString();) if (collection["concerns"] != null) { string concern = collection["concerns"].ToString(); switch(concern) { case UpdateUtils.URGENT_CONCERN: pa.ConcernID = UpdateUtils.URGENT_CONCERN_ID; break; case UpdateUtils.POSSIBLE_CONCERN: pa.ConcernID = UpdateUtils.POSSIBLE_CONCERN_ID; break; case UpdateUtils.LEAST_CONCERN: pa.ConcernID = UpdateUtils.LEAST_CONCERN_ID; break; case UpdateUtils.NOT_CLASSIFIED: pa.ConcernID = UpdateUtils.NOT_CLASSIFIED_ID; break; } TblReview review = reviews.getSingleReviewEdit(reviewid); review.ConcernID = pa.ConcernID; DB.Save(review); generics.resetCurrentConcernForReview(reviewid); pa.CurrentConcern = true; } else { pa.ConcernID = UpdateUtils.NOT_CLASSIFIED_ID; pa.CurrentConcern = true; } string completed = collection["completed"]; if ((completed!=null) && (completed.Equals("on"))) { DateTime dateCompleted = DateTime.Now; if (collection["pda_completed_date"] != null && collection["pda_completed_date"].Length > 0) { dateCompleted = DateTime.Parse(collection["pda_completed_date"]); pa.CompletedDate = dateCompleted; } else { pa.CompletedDate = dateCompleted; } pa.Completed = true; } pa.DateAdded = DateTime.Now; return reviews.SavePA(pa); }
public void Insert(int? PALibID,DateTime? DateStarted,DateTime? DeadlineDate,int? CommitteeID,int? MeetingID,int? ReviewID,bool Deleted,bool Completed,DateTime? CompletedDate,DateTime? DateAdded,DateTime? DateModified,int? ConcernID,bool? CurrentConcern) { ParagraphAction item = new ParagraphAction(); item.PALibID = PALibID; item.DateStarted = DateStarted; item.DeadlineDate = DeadlineDate; item.CommitteeID = CommitteeID; item.MeetingID = MeetingID; item.ReviewID = ReviewID; item.Deleted = Deleted; item.Completed = Completed; item.CompletedDate = CompletedDate; item.DateAdded = DateAdded; item.DateModified = DateModified; item.ConcernID = ConcernID; item.CurrentConcern = CurrentConcern; item.Save(UserName); }
public int SavePA(ParagraphAction pa) { return(DB.Save(pa)); }