public POCreateHandler(GlobalSolusindoDb db, tblM_User user, POValidator pOValidator, POFactory pOFactory , POQuery pOQuery) : base(db, user) { this.POValidator = pOValidator; this.POFactory = pOFactory; this.POQuery = pOQuery; this.POEntryDataProvider = new POEntryDataProvider(db, user, pOQuery); }
public JqGrid ForPOGrid(JqGrid grid) { var query = new POQuery(); query.keyword = grid.keyWord; grid = QueryTableHelper.QueryGrid <CasContractFilingEntity>(query, grid); return(grid); }
public POImportExcelHandler(GlobalSolusindoDb db, tblM_User user, POValidator poValidator, POFactory poFactory, POQuery poQuery) : base(db, user) { this.poValidator = poValidator; this.poFactory = poFactory; this.poQuery = poQuery; this.poEntryDataProvider = new POEntryDataProvider(db, user, poQuery); }
public IHttpActionResult Get(int id) { //string accessType = "PO_ViewAll"; //ThrowIfUserHasNoRole(accessType); using (POQuery poQuery = new POQuery(Db)) { var data = poQuery.GetByPrimaryKey(id); SaveLog("PO", "Get", JsonConvert.SerializeObject(new { primaryKey = id })); return(Ok(new SuccessResponse(data))); } }
public IHttpActionResult GetRevenueCost(string start, string end, int project) { //string accessType = "PO_ViewAll"; //ThrowIfUserHasNoRole(accessType); //if (filter == null) // throw new KairosException("Missing search filter parameter"); ThrowIfUserHasNoRole(readRole); DateTime startDate = Convert.ToDateTime(start); DateTime endDate = Convert.ToDateTime(end); using (var poQuery = new POQuery(Db)) { var data = poQuery.GetRevenueCost(startDate, endDate, project); return(Ok(new SuccessResponse(data))); } }
public List <PODTO> CreateListFromExcelBase64(POImportDTO importDTO) { var base64 = importDTO.File; base64 = base64.Replace("data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,", ""); var wb = ExcelConverter.FromBase64(base64); var sheet = wb.Worksheet("POUpload"); var nonEmptyRowCount = sheet.RowsUsed().Count() + 1; var poQuery = new POQuery(Db); List <PODTO> poList = new List <PODTO>(); //first index is 1, and the first one is header title for (int i = 2; i < nonEmptyRowCount; i++) { var row = sheet.Row(i); var newPO = CreatePODTO(row); poList.Add(newPO); } return(poList); }
public POEntryDataProvider(GlobalSolusindoDb db, tblM_User user, POQuery pOQuery) : base(db, user) { this.POQuery = pOQuery; }