private void BindGridWithFilter() { log4net.ILog logger = log4net.LogManager.GetLogger("File"); try { AdminBLL ws = new AdminBLL(); GetShiftData objReq = new GetShiftData(); string WhereClause = ReturnWhere(); if (!string.IsNullOrEmpty(txtStaffNo.Text)) { objReq.Shift_ID = txtStaffNo.Text; } if (!string.IsNullOrEmpty(txtShiftName1.Text)) { objReq.shiftdep = txtShiftName1.Text; } if (!string.IsNullOrEmpty(WhereClause)) { objReq.WhereClause = WhereClause; } GetShiftDataResponse ret = ws.GetShift(objReq); int pageSize = ContextKeys.GRID_PAGE_SIZE; gvShiftTable.PageSize = pageSize; gvShiftTable.DataSource = ret.Shift_ID; gvShiftTable.DataBind(); } catch (Exception ex) { logger.Info(ex.Message); } }
public GetShiftDataResponse GetShift(GetShiftData objGetNewShiftRequest) { try { AdminDAL objAdminDAL = new AdminDAL(); GetShiftDataResponse ret = new GetShiftDataResponse(); List <Shift> lst = objAdminDAL.GetShift(objGetNewShiftRequest); ret.Shift_ID = lst; return(ret); } catch (Exception ex) { throw ex; } }
private void BindGrid() { log4net.ILog logger = log4net.LogManager.GetLogger("File"); try { AdminBLL ws = new AdminBLL(); GetShiftData _req = new GetShiftData(); GetShiftDataResponse _resp = ws.GetShift(_req); int pageSize = ContextKeys.GRID_PAGE_SIZE; gvShiftTable.PageSize = pageSize; gvShiftTable.DataSource = _resp.Shift_ID; gvShiftTable.DataBind(); } catch (Exception ex) { logger.Info(ex.Message); } }
private void PopulatePageCntrls(int argsBGID) { Int32 iCount = 0; GetShiftDataResponse ret = null; log4net.ILog logger = log4net.LogManager.GetLogger("File"); try { DateTime dt; AdminBLL objAdminBLL = new AdminBLL(); GetShiftData objGetBillingTableRequest = new GetShiftData(); objGetBillingTableRequest.Shift_ID = argsBGID.ToString(); objGetBillingTableRequest.WhereClause = " where Shift_ID=" + argsBGID.ToString(); ret = objAdminBLL.GetShift(objGetBillingTableRequest); hdnBTID.Value = ret.Shift_ID[iCount].Shift_ID.ToString(); txtaddshiftID.Text = ret.Shift_ID[iCount].Shift_ID.ToString(); txtaddshiftName.Text = ret.Shift_ID[iCount].shiftdep.ToString(); txtaddLocationName.Text = ret.Shift_ID[iCount].Location.ToString(); dt = Convert.ToDateTime(ret.Shift_ID[iCount].ShiftDateFrom); txtaddDateFrom.Text = Convert.ToString(dt); dt = Convert.ToDateTime(ret.Shift_ID[iCount].ShiftDateTo); txtaddDateTo.Text = Convert.ToString(dt); dt = Convert.ToDateTime(ret.Shift_ID[iCount].ShiftTimeFrom); TimeSelector1.Date = dt; dt = Convert.ToDateTime(ret.Shift_ID[iCount].ShiftTimeTo); TimeSelector2.Date = dt; } catch (Exception ex) { logger.Info(ex.Message); } }