public async Task <DTO.QuotationMng.SearchFormData> SearchDataAsync() { // authentication //Module.Framework.BLL fwBll = new Module.Framework.BLL(); //if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) //{ // return InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED)); //} BLL.QuotationMng bll = new BLL.QuotationMng(); DTO.QuotationMng.SearchFormData data = await bll.GetDataWithFilterAsync(ControllerContext.GetAuthUserId(), new Hashtable(), 50, 1, "UpdatedDate", "DESC"); return(data); }
public IHttpActionResult SearchData() { // authentication //Module.Framework.BLL fwBll = new Module.Framework.BLL(); //if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) //{ // return InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED)); //} BLL.QuotationMng bll = new BLL.QuotationMng(); Library.DTO.Notification notification; int totalRows = 0; DTO.QuotationMng.SearchFormData data = bll.GetDataWithFilter(ControllerContext.GetAuthUserId(), new Hashtable(), 50, 1, "UpdatedDate", "DESC", out totalRows, out notification); return(Ok(new Library.DTO.ReturnData <DTO.QuotationMng.SearchFormData>() { Data = data, Message = notification, TotalRows = totalRows })); }
public IHttpActionResult Gets(DTO.Search searchInput) { // authentication Module.Framework.BLL fwBll = new Module.Framework.BLL(); if (!fwBll.CanPerformAction(ControllerContext.GetAuthUserId(), moduleCode, Library.DTO.ModuleAction.CanRead)) { return(InternalServerError(new Exception(Properties.Resources.NOT_AUTHORIZED))); } BLL.QuotationMng bll = new BLL.QuotationMng(); Library.DTO.Notification notification; int totalRows = 0; DTO.QuotationMng.SearchFormData data = bll.GetDataWithFilter(ControllerContext.GetAuthUserId(), searchInput.Filters, searchInput.PageSize, searchInput.PageIndex, searchInput.SortedBy, searchInput.SortedDirection, out totalRows, out notification); return(Ok(new Library.DTO.ReturnData <DTO.QuotationMng.SearchFormData>() { Data = data, Message = notification, TotalRows = totalRows })); }