protected void Page_Load(object sender, EventArgs e) { if (!X.IsAjaxRequest && !IsPostBack) { SetExtLanguage(); HideShowButtons(); HideShowColumns(); try { FillDepartment(); departmentId.Select(0); FillBranch(); branchId.Select(0); FillPosition(); ComboBox1.Select(0); ActiveAttendanceRequest r = GetActiveAttendanceRequest(); ListResponse <ActiveAbsence> ABs = _timeAttendanceService.ChildGetAll <ActiveAbsence>(r); absenseStore.DataSource = ABs.Items; absenseStore.DataBind(); } catch { } } }
private ActiveAttendanceRequest GetActiveAttendanceRequest() { ActiveAttendanceRequest req = new ActiveAttendanceRequest(); if (!string.IsNullOrEmpty(branchId.Text) && branchId.Value.ToString() != "0") { req.BranchId = branchId.Value.ToString(); } else { req.BranchId = "0"; } if (!string.IsNullOrEmpty(departmentId.Text) && departmentId.Value.ToString() != "0") { req.DepartmentId = departmentId.Value.ToString(); } else { req.DepartmentId = "0"; } if (!string.IsNullOrEmpty(ComboBox1.Text) && ComboBox1.Value.ToString() != "0") { req.PositionId = ComboBox1.Value.ToString(); } else { req.PositionId = "0"; } return(req); }
public void RefreshAll() { ActiveAttendanceRequest r = GetActiveAttendanceRequest(); ListResponse <ActiveAbsence> ABs = _timeAttendanceService.ChildGetAll <ActiveAbsence>(r); absenseStore.DataSource = ABs.Items; absenseStore.DataBind(); }
protected void latenessStore_ReadData(object sender, StoreReadDataEventArgs e) { ActiveAttendanceRequest r = GetActiveAttendanceRequest(); ListResponse <ActiveLate> ALs = _timeAttendanceService.ChildGetAll <ActiveLate>(r); latenessStore.DataSource = ALs.Items; latenessStore.DataBind(); }
protected void absenseStore_ReadData(object sender, StoreReadDataEventArgs e) { ActiveAttendanceRequest r = GetActiveAttendanceRequest(); ListResponse <ActiveAbsence> ABs = _timeAttendanceService.ChildGetAll <ActiveAbsence>(r); absenseStore.DataSource = ABs.Items; absenseStore.DataBind(); }
protected void activeStore_refresh(object sender, StoreReadDataEventArgs e) { ActiveAttendanceRequest r = GetActiveAttendanceRequest(); ListResponse <ActiveCheck> ACs = _timeAttendanceService.ChildGetAll <ActiveCheck>(r); activeStore.DataSource = ACs.Items; activeStore.DataBind(); }
protected void missingPunchesStore_ReadData(object sender, StoreReadDataEventArgs e) { ActiveAttendanceRequest r = GetActiveAttendanceRequest(); ListResponse <MissedPunch> ACs = _timeAttendanceService.ChildGetAll <MissedPunch>(r); missingPunchesStore.DataSource = ACs.Items; missingPunchesStore.DataBind(); }
protected void outStore_ReadData(object sender, StoreReadDataEventArgs e) { ActiveAttendanceRequest r = GetActiveAttendanceRequest(); ListResponse <ActiveOut> AOs = _timeAttendanceService.ChildGetAll <ActiveOut>(r); outStore.DataSource = AOs.Items; outStore.DataBind(); }
protected void checkMontierStore_ReadData(object sender, StoreReadDataEventArgs e) { ActiveAttendanceRequest r = GetActiveAttendanceRequest(); ListResponse <CheckMonitor> CMs = _timeAttendanceService.ChildGetAll <CheckMonitor>(r); foreach (var item in CMs.Items) { item.figureTitle = GetLocalResourceObject(item.figureId.ToString()).ToString(); } checkMontierStore.DataSource = CMs.Items; checkMontierStore.DataBind(); }
private void FillLatenessGrid() { ActiveAttendanceRequest r = new ActiveAttendanceRequest(); r.BranchId = r.DepartmentId = r.PositionId = "0"; r.StartAt = "0"; r.Size = "1000"; ListResponse <ActiveLate> ALs = _timeAttendanceService.ChildGetAll <ActiveLate>(r); if (!ALs.Success) { X.Msg.Alert(Resources.Common.Error, ALs.Summary).Show(); return; } latenessStore.DataSource = ALs.Items; latenessStore.DataBind(); }