public async Task <JsonResult> SearchTemps(string freeText, string status, int page = 1, int limit = 20, string fromDate = null, string toDate = null, int loaiNgay = 0, int manhom = 0, int mathanhvien = 0) { page = page <= 0 ? 1 : page; DateTime dtFromDate = DateTime.MinValue, dtToDate = DateTime.Now.AddDays(3); if (fromDate != "") { dtFromDate = DateTimeFormat.ConvertddMMyyyyToDateTimeNew(fromDate); } if (toDate != "") { dtToDate = DateTimeFormat.ConvertddMMyyyyToDateTimeNew(toDate); } var profiles = await _rpMCredit.GetTempProfiles(page, limit, freeText, GlobalData.User.IDUser, status, dtFromDate, dtToDate, loaiNgay, manhom, mathanhvien = 0); if (profiles == null || !profiles.Any()) { return(ToJsonResponse(true, "", DataPaging.Create(null as List <ProfileSearchSql>, 0))); } var result = DataPaging.Create(profiles, profiles[0].TotalRecord); return(ToJsonResponse(true, "", result)); }
public async Task <JsonResult> Search(string freeText = null, string status = null, int groupId = 0, int assigneeId = 0, int page = 1, int limit = 10, string fromDate = null, string toDate = null, int loaiNgay = 1) { DateTime dtFromDate = DateTime.MinValue, dtToDate = DateTime.Now.AddDays(3); if (fromDate != "") { dtFromDate = DateTimeFormat.ConvertddMMyyyyToDateTimeNew(fromDate); } if (toDate != "") { dtToDate = DateTimeFormat.ConvertddMMyyyyToDateTimeNew(toDate); } var result = await _bizRevokeDebt.SearchAsync(GlobalData.User.IDUser, freeText, status, page, limit, groupId, assigneeId, dtFromDate, dtToDate, loaiNgay); return(ToJsonResponse(true, null, result)); }