private bool Delete(int intPKID) { bool retval = false; objReviews = new tblReviews(); var _with1 = objReviews; if (_with1.LoadByPrimaryKey(intPKID)) { tblReviews objReviewDetail = new tblReviews(); objReviewDetail.Where.AppReviewID.Value = _with1.AppReviewID; objReviewDetail.Query.Load(); if (objReviewDetail.RowCount > 0) { objReviewDetail.DeleteAll(); objReviewDetail.Save(); } objReviewDetail = null; _with1.MarkAsDeleted(); _with1.Save(); } retval = true; objReviews = null; return(retval); }
protected void btnSave_Click(object sender, EventArgs e) { objReviews = new tblReviews(); objReviews.LoadByPrimaryKey(Convert.ToInt32(hdnPKID.Value)); objReviews.s_AppPublishedBy = Session[appFunctions.Session.UserID.ToString()].ToString(); objReviews.AppPublishedDate = GetDateTime(); objReviews.s_AppReviewStatus = Convert.ToInt32(Enums.Enum_ReviewStatus.Approved).ToString(); objReviews.Save(); LoadDataGrid(true, false); }
private bool Reject(int intPKID) { bool retval = false; objReviews = new tblReviews(); if (objReviews.LoadByPrimaryKey(intPKID)) { if (objReviews.RowCount > 0) { objReviews.s_AppRemark = txtRemark.Text; objReviews.AppReviewStatus = Convert.ToInt32(Enums.Enum_ReviewStatus.Rejected); objReviews.Save(); } objReviews = null; } retval = true; objReviews = null; return(retval); }
private bool Approve(int intPKID) { bool retval = false; objReviews = new tblReviews(); if (objReviews.LoadByPrimaryKey(intPKID)) { if (objReviews.RowCount > 0) { objReviews.s_AppPublishedBy = Session[appFunctions.Session.UserID.ToString()].ToString(); objReviews.AppPublishedDate = GetDateTime(); objReviews.AppRemark = ""; objReviews.AppReviewStatus = Convert.ToInt32(Enums.Enum_ReviewStatus.Approved); objReviews.Save(); } objReviews = null; } retval = true; objReviews = null; return(retval); }
public bool Saveview() { // CheckSession(); objReviews = new tblReviews(); objReviews.AddNew(); objReviews.s_AppProductDetailID = hdnProductDetailId.Value; objReviews.s_AppCustomerID = Session[appFunctions.Session.ClientUserID.ToString()].ToString(); objReviews.s_AppRating = RatingReview.CurrentRating.ToString(); objReviews.AppReviewStatus = Convert.ToInt32(Enums.Enum_ReviewStatus.Submitted); objReviews.AppReviewDate = GetDateTime(); objReviews.s_AppComment = txtReview.Text; objReviews.s_AppTitle = txtTitle.Text; objReviews.Save(); objReviews = null; return(true); }