public ActionResult GetView2Action_ByCasecode() { try { if (RouteData.Values["id"] != null && RouteData.Values["id"].ToString() != "") { string p_caseCode = RouteData.Values["id"].ToString(); TimeSheet_BL _obj_bl = new TimeSheet_BL(); Timesheet_Info _Timesheet_Info = _obj_bl.Timesheet_GetBy_Casecode(p_caseCode); if (_Timesheet_Info.Status == (decimal)Common.CommonData.CommonEnums.TimeSheet_Status.New) { return(View("~/Areas/Manager/Views/TimeSheet/_PartialApproveTimeSheet.cshtml", _Timesheet_Info)); } else if (_Timesheet_Info.Status == (decimal)Common.CommonData.CommonEnums.TimeSheet_Status.Reject) { return(View("~/Areas/Manager/Views/TimeSheet/_PartialEditTimeSheet.cshtml", _Timesheet_Info)); } else { return(View("~/Areas/Manager/Views/TimeSheet/_PartialViewTimeSheet.cshtml", _Timesheet_Info)); } } else { return(View()); } } catch (Exception ex) { Logger.LogException(ex); return(View("~/Areas/Manager/Views/TimeSheet/_PartialApproveTimeSheet.cshtml")); } }
public decimal Timesheet_Insert(Timesheet_Info p_obj, string p_language_code) { try { TimeSheet_DA _da = new TimeSheet_DA(); return(_da.Timesheet_Insert(p_obj.Name, p_obj.App_Case_Code, p_obj.Lawer_Id, p_obj.Time_Date, p_obj.From_Time, p_obj.To_Time, p_obj.Hours, p_obj.Hours_Adjust, p_obj.Notes, p_obj.Status, p_obj.Created_By, DateTime.Now, p_language_code)); } catch (Exception ex) { Logger.LogException(ex); return(-1); } }
public decimal Timesheet_Update(Timesheet_Info p_obj, string p_language_code) { try { TimeSheet_DA _da = new TimeSheet_DA(); return(_da.Timesheet_Update(p_obj.Id, p_obj.Name, p_obj.Time_Date, p_obj.From_Time, p_obj.To_Time, p_obj.Hours, p_obj.Hours_Adjust, p_obj.Notes, p_obj.Modify_By, DateTime.Now, p_language_code)); } catch (Exception ex) { Logger.LogException(ex); return(-1); } }
public ActionResult DoEditTimeSheet(Timesheet_Info p_Timesheet_Info) { try { TimeSheet_BL _obj_bl = new TimeSheet_BL(); p_Timesheet_Info.Modify_By = SessionData.CurrentUser.Username; decimal _ck = _obj_bl.Timesheet_Update(p_Timesheet_Info, AppsCommon.GetCurrentLang()); return(Json(new { success = _ck })); } catch (Exception ex) { Logger.LogException(ex); return(Json(new { success = "-1" })); } }
public ActionResult DoInsertTimeSheet(Timesheet_Info p_Timesheet_Info) { try { TimeSheet_BL _obj_bl = new TimeSheet_BL(); p_Timesheet_Info.Created_By = SessionData.CurrentUser.Username; p_Timesheet_Info.Lawer_Id = SessionData.CurrentUser.Id; p_Timesheet_Info.Status = (decimal)CommonEnums.TimeSheet_Status.New; decimal _ck = _obj_bl.Timesheet_Insert(p_Timesheet_Info, AppsCommon.GetCurrentLang()); return(Json(new { success = _ck })); } catch (Exception ex) { Logger.LogException(ex); return(Json(new { success = "-1" })); } }
public ActionResult GetView2Approve_ByCasecode() { try { if (RouteData.Values["id"] != null && RouteData.Values["id"].ToString() != "") { string p_caseCode = RouteData.Values["id"].ToString(); TimeSheet_BL _obj_bl = new TimeSheet_BL(); Timesheet_Info _Timesheet_Info = _obj_bl.Timesheet_GetBy_Casecode(p_caseCode); return(View("~/Areas/Manager/Views/TimeSheet/_PartialApproveTimeSheet.cshtml", _Timesheet_Info)); } else { return(View()); } } catch (Exception ex) { Logger.LogException(ex); return(View("~/Areas/Manager/Views/TimeSheet/_PartialApproveTimeSheet.cshtml")); } }
public ActionResult GetView2Approve() { try { if (RouteData.Values["id"] != null && RouteData.Values["id"].ToString() != "") { decimal p_id = Convert.ToDecimal(RouteData.Values["id"].ToString()); TimeSheet_BL _obj_bl = new TimeSheet_BL(); Timesheet_Info _Timesheet_Info = _obj_bl.Timesheet_GetBy_Id(p_id); return(View("~/Areas/Manager/Views/TimeSheet/_PartialApproveTimeSheet.cshtml", _Timesheet_Info)); } else { return(View()); } } catch (Exception ex) { Logger.LogException(ex); return(View("~/Areas/Manager/Views/TimeSheet/_PartialApproveTimeSheet.cshtml")); } }