Ejemplo n.º 1
0
        protected void Store1_RefreshData(object sender, StoreReadDataEventArgs e)
        {
            //GEtting the filter from the page
            string filter = string.Empty;



            //Fetching the corresponding list

            //in this test will take a list of News
            ListRequest request = new ListRequest();

            request.Filter = "";
            ListResponse <SocialSecuritySchedule> routers = _PayrollService.ChildGetAll <SocialSecuritySchedule>(request);

            if (!routers.Success)
            {
                Common.errorMessage(routers);
                return;
            }
            this.Store1.DataSource = routers.Items;
            e.Total = routers.Items.Count;;

            this.Store1.DataBind();
        }
Ejemplo n.º 2
0
        protected void Store1_RefreshData(object sender, StoreReadDataEventArgs e)
        {
            //GEtting the filter from the page
            string filter     = string.Empty;
            int    totalCount = 1;



            //Fetching the corresponding list

            //in this test will take a list of News
            ListRequest request = new ListRequest();

            request.Filter = "";
            ListResponse <FiscalYear> branches = _payrollService.ChildGetAll <FiscalYear>(request);

            if (!branches.Success)
            {
                X.Msg.Alert(Resources.Common.Error, GetGlobalResourceObject("Errors", branches.ErrorCode) != null ? GetGlobalResourceObject("Errors", branches.ErrorCode).ToString() + "<br>" + GetGlobalResourceObject("Errors", "ErrorLogId") + branches.LogId: branches.Summary).Show();
                return;
            }
            this.Store1.DataSource = branches.Items;
            e.Total = branches.count;

            this.Store1.DataBind();
        }
Ejemplo n.º 3
0
        private void FilltimeCodeStore()
        {
            ListRequest request = new ListRequest();

            request.Filter = "";
            ListResponse <TimeCode> response = _PayrollService.ChildGetAll <TimeCode>(request);

            if (!response.Success)
            {
                Common.errorMessage(response);
                return;
            }
            timeVariationStore.DataSource = response.Items;
            timeVariationStore.DataBind();
        }
Ejemplo n.º 4
0
        private void FillBSStore()
        {
            ListRequest request = new ListRequest();

            request.Filter = "";
            ListResponse <PayrollBenefitSchedule> Categories = _payrollService.ChildGetAll <PayrollBenefitSchedule>(request);

            if (!Categories.Success)
            {
                Common.errorMessage(Categories);
            }
            this.PayrollBenSchedStore.DataSource = Categories.Items;

            this.PayrollBenSchedStore.DataBind();
        }
Ejemplo n.º 5
0
        protected void Store1_RefreshData(object sender, StoreReadDataEventArgs e)
        {
            //GEtting the filter from the page
            string filter     = string.Empty;
            int    totalCount = 1;


            //Fetching the corresponding list

            //in this test will take a list of News
            //ListRequest request = new ListRequest();

            LeavePaymentsListRequest request = GetLeavePaymentRequest();

            request.Filter  = "";
            request.Size    = e.Limit.ToString();
            request.StartAt = e.Start.ToString();
            ListResponse <LeavePayment> routers = _payrollService.ChildGetAll <LeavePayment>(request);

            if (!routers.Success)
            {
                Common.errorMessage(routers);
                return;
            }
            this.Store1.DataSource = routers.Items;
            e.Total = routers.count;

            this.Store1.DataBind();
        }
Ejemplo n.º 6
0
        protected void Store1_RefreshData(object sender, StoreReadDataEventArgs e)
        {
            //GEtting the filter from the page
            string filter     = string.Empty;
            int    totalCount = 1;



            //Fetching the corresponding list

            //in this test will take a list of News
            ListRequest request = new ListRequest();

            request.Filter = "";
            ListResponse <PayrollArgument> resp = _payrollService.ChildGetAll <PayrollArgument>(request);

            if (!resp.Success)
            {
                Common.errorMessage(resp);
                return;
            }
            this.Store1.DataSource = resp.Items;
            e.Total = resp.Items.Count;;

            this.Store1.DataBind();
        }
Ejemplo n.º 7
0
        //protected void fiscalPeriodsStore_ReadData(object sender, StoreReadDataEventArgs e)
        //{
        //    FiscalPeriodsListRequest req = new FiscalPeriodsListRequest();
        //    try
        //    {
        //        req.Year = fiscalYear.Value.ToString();
        //        if (!string.IsNullOrEmpty(salaryType.Value.ToString()))
        //            req.PeriodType = Convert.ToInt32(salaryType.Value.ToString());
        //        else
        //        {
        //            return;
        //        }
        //        if (string.IsNullOrEmpty(req.Year))
        //        {
        //            //    X.Call("FiscalYearError", Resources.Errors.);
        //            return;

        //        }
        //        req.Status = "0";

        //        ListResponse<FiscalPeriod> resp = _payrollService.ChildGetAll<FiscalPeriod>(req);
        //        if (!resp.Success)
        //        {
        //            X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
        //            X.Msg.Alert(Resources.Common.Error, GetGlobalResourceObject("Errors", resp.ErrorCode) != null ? GetGlobalResourceObject("Errors", resp.ErrorCode).ToString() + "<br>" + GetGlobalResourceObject("Errors", "ErrorLogId") + resp.LogId : resp.Summary).Show();
        //            return;
        //        }
        //        List<object> obs = new List<Object>();
        //        resp.Items.ForEach(x => obs.Add(new { recordId = x.periodId, name = x.GetFriendlyName(GetLocalResourceObject("Month").ToString(), GetLocalResourceObject("Week").ToString(), GetLocalResourceObject("Weeks").ToString(), _systemService.SessionHelper.GetDateformat()) }));
        //        fiscalPeriodsStore.DataSource = obs;
        //        fiscalPeriodsStore.DataBind();


        //    }
        //    catch { }
        //}
        private List <FiscalYear> GetYears()
        {
            ListRequest l = new ListRequest();
            ListResponse <FiscalYear> resp = _payrollService.ChildGetAll <FiscalYear>(l);

            if (!resp.Success)
            {
                X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                X.Msg.Alert(Resources.Common.Error, GetGlobalResourceObject("Errors", resp.ErrorCode) != null ? GetGlobalResourceObject("Errors", resp.ErrorCode).ToString() + "<br>" + GetGlobalResourceObject("Errors", "ErrorLogId") + resp.LogId : resp.Summary).Show();
                return(new List <FiscalYear>());
            }
            return(resp.Items);
        }
Ejemplo n.º 8
0
        private void FillSsid()
        {
            ListRequest request = new ListRequest();

            request.Filter = "";
            ListResponse <SocialSecuritySchedule> routers = _payrollService.ChildGetAll <SocialSecuritySchedule>(request);

            if (!routers.Success)
            {
                Common.errorMessage(routers);
                return;
            }
            this.ssIdstore.DataSource = routers.Items;
            this.ssIdstore.DataBind();
        }
Ejemplo n.º 9
0
        protected void Store1_RefreshData(object sender, StoreReadDataEventArgs e)
        {
            //GEtting the filter from the page
            string filter     = string.Empty;
            int    totalCount = 1;

            ListRequest request = new ListRequest();

            request.Filter = "";
            ListResponse <TimeCode> response = _payrollService.ChildGetAll <TimeCode>(request);

            if (!response.Success)
            {
                Common.errorMessage(response);
                return;
            }
            response.Items.ForEach(x => x.edTypeString = FillEdType(x.edType));

            Store1.DataSource = response.Items;
            e.Total           = response.Items.Count;
            Store1.DataBind();

            //List<TimeCode> routers = new List<TimeCode>();
            //routers.Add(new TimeCode { timeCode = ConstTimeVariationType.Day_Bonus });
            //routers.Add(new TimeCode { timeCode = ConstTimeVariationType.DAY_LEAVE_WITHOUT_EXCUSE });
            //routers.Add(new TimeCode { timeCode = ConstTimeVariationType.DURING_SHIFT_LEAVE });
            //routers.Add(new TimeCode { timeCode = ConstTimeVariationType.EARLY_CHECKIN });
            //routers.Add(new TimeCode { timeCode = ConstTimeVariationType.EARLY_LEAVE });
            //routers.Add(new TimeCode { timeCode = ConstTimeVariationType.LATE_CHECKIN });
            //routers.Add(new TimeCode { timeCode = ConstTimeVariationType.MISSED_PUNCH });
            //routers.Add(new TimeCode { timeCode = ConstTimeVariationType.OVERTIME });
            //routers.Add(new TimeCode { timeCode = ConstTimeVariationType.PAID_LEAVE });
            //routers.Add(new TimeCode { timeCode = ConstTimeVariationType.SHIFT_LEAVE_WITHOUT_EXCUSE });
            //routers.Add(new TimeCode { timeCode = ConstTimeVariationType.UNPAID_LEAVE });


            //Fetching the corresponding list

            //in this test will take a list of News
            //ListRequest request = new ListRequest();

            //ListResponse<TimeCode> routers = _payrollService.ChildGetAll<TimeCode>(request);
            //if (!routers.Success)
            //{
            //     Common.errorMessage(routers);
            //    return;
            //}
        }
Ejemplo n.º 10
0
        public object PayCodeReadData(string action, Dictionary <string, object> extraParams)

        {
            ListRequest            req = new ListRequest();
            ListResponse <PayCode> eds = _PayrollService.ChildGetAll <PayCode>(req);

            //Store2.DataSource = eds.Items;
            //Store2.DataBind();
            if (eds.Items == null)
            {
                return(new List <PayCode>());
            }
            else
            {
                return(eds.Items);
            }
        }
Ejemplo n.º 11
0
        private void FillPayId()
        {
            PayrollListRequest req = new PayrollListRequest();

            req.Year       = "0";
            req.PeriodType = "5";
            req.Status     = "0";
            req.Size       = "30";
            req.StartAt    = "0";
            req.Filter     = "";

            ListResponse <GenerationHeader> resp = payrollService.ChildGetAll <GenerationHeader>(req);

            if (!resp.Success)
            {
                Common.errorMessage(resp);
                return;
            }

            string dateFormat = systemService.SessionHelper.GetDateformat();

            if (systemService.SessionHelper.CheckIfArabicSession())
            {
                resp.Items.ForEach(x => x.payRefWithDateRange = x.payRef + " ( " + x.startDate.ToString("dd/MM/yyyy", new CultureInfo("ar-AE")) + " - " + x.endDate.ToString("dd/MM/yyyy", new CultureInfo("ar-AE")) + " )");
            }
            else
            {
                resp.Items.ForEach(x => x.payRefWithDateRange = x.payRef + " ( " + x.startDate.ToString("dd/MM/yyyy", new CultureInfo("en")) + " - " + x.endDate.ToString("dd/MM/yyyy", new CultureInfo("en")) + " )");
            }



            payIdStore.DataSource = resp.Items;
            payIdStore.DataBind();
            //return resp.Items;
        }
Ejemplo n.º 12
0
        private void FillPenalty()
        {
            string filter = string.Empty;



            //Fetching the corresponding list

            //in this test will take a list of News
            ListRequest request = new ListRequest();

            request.Filter = "";
            ListResponse <PenaltyType> response = _payrollService.ChildGetAll <PenaltyType>(request);

            if (!response.Success)
            {
                Common.errorMessage(response);
                return;
            }


            PenaltyStore.DataSource = response.Items;
            PenaltyStore.DataBind();
        }
Ejemplo n.º 13
0
        protected void PoPuP(object sender, DirectEventArgs e)
        {
            panelRecordDetails.ActiveIndex = 0;
            int    id   = Convert.ToInt32(e.ExtraParams["id"]);
            string type = e.ExtraParams["type"];

            switch (type)
            {
            case "imgEdit":
                //Step 1 : get the object from the Web Service
                panelRecordDetails.ActiveIndex = 1;
                RecordRequest r = new RecordRequest();
                r.RecordID = id.ToString();
                RecordResponse <PayrollIndemnity> response = _payrollService.ChildGetRecord <PayrollIndemnity>(r);
                if (!response.Success)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    Common.errorMessage(response);
                    return;
                }
                //Step 2 : call setvalues with the retrieved object
                this.BasicInfoTab.SetValues(response.result);

                PayrollIndemnityDetailsListRequest req = new PayrollIndemnityDetailsListRequest();
                req.inId = r.RecordID;
                ListResponse <PayrollIndemnityDetails> periods = _payrollService.ChildGetAll <PayrollIndemnityDetails>(req);
                periodsGrid.Store[0].DataSource = periods.Items;
                periodsGrid.Store[0].DataBind();
                periodsGrid.DataBind();
                PayrollIndemnityDetailsListRequest req1 = new PayrollIndemnityDetailsListRequest();
                req1.inId = r.RecordID;
                ListResponse <PayrollIndemnityRecognition> PayrollIndemnityList = _payrollService.ChildGetAll <PayrollIndemnityRecognition>(req);

                IndemnityRecognitionGrid.Store[0].DataSource = PayrollIndemnityList.Items;
                IndemnityRecognitionGrid.Store[0].DataBind();
                IndemnityRecognitionStore.DataBind();
                // InitCombos(response.result);
                this.EditRecordWindow.Title = Resources.Common.EditWindowsTitle;
                this.EditRecordWindow.Show();
                break;

            case "imgDelete":
                X.Msg.Confirm(Resources.Common.Confirmation, Resources.Common.DeleteOneRecord, new MessageBoxButtonsConfig
                {
                    Yes = new MessageBoxButtonConfig
                    {
                        //We are call a direct request metho for deleting a record
                        Handler = String.Format("App.direct.DeleteRecord({0})", id),
                        Text    = Resources.Common.Yes
                    },
                    No = new MessageBoxButtonConfig
                    {
                        Text = Resources.Common.No
                    }
                }).Show();
                break;

            case "imgAttach":

                //Here will show up a winow relatice to attachement depending on the case we are working on
                break;

            default:
                break;
            }
        }