public Result <List <UserInfo> > PendingAgent(string key = "") { var result = new Result <List <UserInfo> >(); try { var objToPending = Context.UserInfos.Include("CompanyInfo") .Where(p => p.AdminVerifyID == (int)EnumCollection.AdminVarifyEnum.NotAccept).ToList(); if (ValidationHelper2.IsValidString(key)) { objToPending = objToPending.Where( p => p.FirstName.Contains(key) || p.LastName.Contains(key) || p.UEmail.Contains(key) || p.CompanyInfo.CEmail.Contains(key) || p.CompanyInfo.CName.Contains(key)).ToList(); } result.Data = objToPending; } catch (Exception ex) { result.HasError = true; result.Message = ex.Message; } return(result); }
public Result <List <Deposite> > GetAllPendingDeposite(string key = "") { var result = new Result <List <Deposite> >(); try { var objToList = Context.Deposites.Where(d => d.AdminVerifyId == (int)EnumCollection.AdminVarifyEnum.NotAccept) .ToList(); if (ValidationHelper2.IsValidString(key)) { objToList = objToList.Where( p => p.ChequeNo.Contains(key) || p.RefNum.Contains(key) || p.ChequeBank.Contains(key)) .ToList(); } result.Data = objToList; } catch (Exception ex) { result.HasError = true; result.Message = ex.Message; } return(result); }
public Result <List <PackagePicture> > GetAll(string key = "") { var result = new Result <List <PackagePicture> >(); try { var objToAll = Context.PackagePictures.ToList(); if (ValidationHelper2.IsValidString(key)) { objToAll = objToAll.Where(p => p.PName.Contains(key)).ToList(); } result.Data = objToAll; } catch (Exception ex) { result.HasError = true; result.Message = ex.Message; } return(result); }