예제 #1
0
        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 { }
            }
        }
예제 #2
0
        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);
        }
예제 #3
0
        public void RefreshAll()
        {
            ActiveAttendanceRequest r = GetActiveAttendanceRequest();

            ListResponse <ActiveAbsence> ABs = _timeAttendanceService.ChildGetAll <ActiveAbsence>(r);

            absenseStore.DataSource = ABs.Items;
            absenseStore.DataBind();
        }
예제 #4
0
        protected void latenessStore_ReadData(object sender, StoreReadDataEventArgs e)
        {
            ActiveAttendanceRequest r = GetActiveAttendanceRequest();

            ListResponse <ActiveLate> ALs = _timeAttendanceService.ChildGetAll <ActiveLate>(r);

            latenessStore.DataSource = ALs.Items;
            latenessStore.DataBind();
        }
예제 #5
0
        protected void absenseStore_ReadData(object sender, StoreReadDataEventArgs e)
        {
            ActiveAttendanceRequest r = GetActiveAttendanceRequest();

            ListResponse <ActiveAbsence> ABs = _timeAttendanceService.ChildGetAll <ActiveAbsence>(r);

            absenseStore.DataSource = ABs.Items;
            absenseStore.DataBind();
        }
예제 #6
0
        protected void activeStore_refresh(object sender, StoreReadDataEventArgs e)
        {
            ActiveAttendanceRequest r = GetActiveAttendanceRequest();

            ListResponse <ActiveCheck> ACs = _timeAttendanceService.ChildGetAll <ActiveCheck>(r);

            activeStore.DataSource = ACs.Items;
            activeStore.DataBind();
        }
예제 #7
0
        protected void missingPunchesStore_ReadData(object sender, StoreReadDataEventArgs e)
        {
            ActiveAttendanceRequest r = GetActiveAttendanceRequest();

            ListResponse <MissedPunch> ACs = _timeAttendanceService.ChildGetAll <MissedPunch>(r);


            missingPunchesStore.DataSource = ACs.Items;
            missingPunchesStore.DataBind();
        }
예제 #8
0
        protected void outStore_ReadData(object sender, StoreReadDataEventArgs e)
        {
            ActiveAttendanceRequest r = GetActiveAttendanceRequest();

            ListResponse <ActiveOut> AOs = _timeAttendanceService.ChildGetAll <ActiveOut>(r);

            outStore.DataSource = AOs.Items;


            outStore.DataBind();
        }
예제 #9
0
        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();
        }
예제 #10
0
        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();
        }