public static bool UpdateRequest(OnDemandRequest Request) { bool isFlag = false; OnDemandRequestBLL objMyRequestBLL = null; try { Common objCommon = new Common(); objMyRequestBLL = new OnDemandRequestBLL(); Request.ModifiedBy = objCommon.GetCurrentUserName(); isFlag = objMyRequestBLL.UpdateRequest(Request); } catch (Exception ex) { // Log the error to a text file in the Error folder Common.WriteError(ex); } finally { objMyRequestBLL = null; } return isFlag; }
public static bool CancelRequest(string RequestId) { bool isFlag = false; OnDemandRequestBLL objMyRequestBLL = null; try { objMyRequestBLL = new OnDemandRequestBLL(); isFlag = objMyRequestBLL.CancelRequest(Convert.ToInt32(RequestId)); } catch (Exception ex) { // Log the error to a text file in the Error folder Common.WriteError(ex); } finally { objMyRequestBLL = null; } return isFlag; }
public static List<OnDemandRequest> GetRejectedUserList() { List<OnDemandRequest> lstUsersDetail = null; OnDemandRequestBLL objUserDetail = null; try { objUserDetail = new OnDemandRequestBLL(); Common objCommon = new Common(); lstUsersDetail = objUserDetail.GetRejectedUserDetails(objCommon.GetCurrentUserName()); } catch (Exception ex) { Common.WriteError(ex); } finally { objUserDetail = null; } return lstUsersDetail; }
public static bool ApproveUserRequest(string UserId, string Comment) { bool isFlag = false; OnDemandRequestBLL objDriverDetailBLL = null; try { Common objCommon = new Common(); objDriverDetailBLL = new OnDemandRequestBLL(); string ModifiedBy = objCommon.GetCurrentUserName(); isFlag = objDriverDetailBLL.ApproveUserRequest(UserId, ModifiedBy, Comment); } catch (Exception ex) { // Log the error to a text file in the Error folder Common.WriteError(ex); } finally { objDriverDetailBLL = null; } return isFlag; }