示例#1
0
        protected void PoPuPPE(object sender, DirectEventArgs e)
        {
            string salaryType = e.ExtraParams["salaryType"];
            string periodId   = e.ExtraParams["periodId"];

            FiscalPeriodRecordRequest request = new FiscalPeriodRecordRequest();

            request.year       = CurrentYear.Text;
            request.salaryType = salaryType;
            request.periodId   = periodId;
            RecordResponse <FiscalPeriod> response = _payrollService.ChildGetRecord <FiscalPeriod>(request);

            if (!response.Success)
            {
                X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                Common.errorMessage(response);
                return;
            }
            //PE_startDate.MinDate = PE_endDate.MinDate = response.result.startDate;
            //PE_startDate.MaxDate = PE_endDate.MaxDate = response.result.endDate;

            //Step 2 : call setvalues with the retrieved object

            this.fiscalPeriodForm.SetValues(response.result);
            this.fiscalPeriodWindow.Show();
        }
示例#2
0
        protected void PoPuP(object sender, DirectEventArgs e)
        {
            FillBSStore();
            FillEDStore();
            FillPayrollExpCondStore();
            FillPayrollExpCalcStore();

            string id   = e.ExtraParams["id"];
            string type = e.ExtraParams["type"];

            switch (type)
            {
            case "imgEdit":
                //Step 1 : get the object from the Web Service
                RecordRequest r = new RecordRequest();
                r.RecordID = id;

                RecordResponse <PayrollBenefit> response = _payrollService.ChildGetRecord <PayrollBenefit>(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);


                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;
            }
        }
示例#3
0
        protected void PoPuP(object sender, DirectEventArgs e)
        {
            string payCode = e.ExtraParams["payCode"];
            string name    = e.ExtraParams["name"];
            string type    = e.ExtraParams["type"];

            switch (type)
            {
            case "imgEdit":
                //Step 1 : get the object from the Web Service
                PayCodeRecordRequest r = new PayCodeRecordRequest();
                r.payCode = payCode;

                RecordResponse <PayCode> response = _payrollService.ChildGetRecord <PayCode>(r);
                if (!response.Success)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    Common.errorMessage(response);
                    return;
                }
                //Step 2 : call setvalues with the retrieved object

                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}','{1}')", payCode, name),
                        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;
            }
        }
示例#4
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;
            }
        }
示例#5
0
        protected void Generate_Click(object sender, DirectEventArgs e)
        {
            if (payId.Value == null || payId.Value.ToString() == string.Empty)
            {
                X.Msg.Alert(Resources.Common.Error, (string)GetLocalResourceObject("SelectPay")).Show();
                return;
            }



            RecordRequest r = new RecordRequest();

            r.RecordID = payId.SelectedItem.Value;


            RecordResponse <GenerationHeader> response = payrollService.ChildGetRecord <GenerationHeader>(r);

            if (!response.Success)
            {
                X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                Common.errorMessage(response);
                return;
            }

            GenerationHeader gh = new GenerationHeader();

            gh.recordId     = response.result.recordId;
            gh.periodId     = response.result.periodId;
            gh.payDate      = response.result.payDate;
            gh.startDate    = response.result.startDate;
            gh.payRef       = response.result.payRef;
            gh.endDate      = response.result.endDate;
            gh.status       = response.result.status;
            gh.payDate      = response.result.payDate;
            gh.notes        = response.result.notes;
            gh.calendarDays = response.result.calendarDays;
            gh.fiscalYear   = response.result.fiscalYear;


            PostRequest <GenerationHeader> request = new PostRequest <GenerationHeader>();

            request.entity = gh;
            PostResponse <GenerationHeader> rrr = _timeAttendanceService.ChildAddOrUpdate <GenerationHeader>(request);

            if (!rrr.Success)//it maybe be another condition
            {
                //Show an error saving...

                Common.errorMessage(rrr);
                return;
            }
            else
            {
                //Add this record to the store

                //Display successful notification
                Notification.Show(new NotificationConfig
                {
                    Title = Resources.Common.Notification,
                    Icon  = Icon.Information,
                    Html  = Resources.Common.RecordSavingSucc
                });
            }
        }
示例#6
0
        protected void PoPuP(object sender, DirectEventArgs e)
        {
            FilltimeCodeStore();
            penaltyDetailStoreCount.Text   = "0";
            panelRecordDetails.ActiveIndex = 0;
            penaltyDetailGrid.Disabled     = false;
            string id = e.ExtraParams["id"];

            currentPenaltyType.Text = id;
            string type = e.ExtraParams["type"];

            this.BasicInfoTab.Reset();

            switch (type)
            {
            case "imgEdit":
                //Step 1 : get the object from the Web Service
                RecordRequest r = new RecordRequest();
                r.RecordID = id;

                RecordResponse <PenaltyType> response = _PayrollService.ChildGetRecord <PenaltyType>(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);


                X.Call("ChangeReason", response.result.reason, GetGlobalResourceObject("ComboBoxValues", "Reason_ATTENDANCE").ToString(), GetGlobalResourceObject("ComboBoxValues", "TimeBasee_DAYS").ToString());


                recordId.Text = id;
                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;
            }
        }
示例#7
0
        protected void PoPuP(object sender, DirectEventArgs e)
        {
            string id   = e.ExtraParams["id"];
            string type = e.ExtraParams["type"];

            currentLeavePayment.Text = id;

            switch (type)
            {
            case "imgEdit":
                //Step 1 : get the object from the Web Service
                RecordRequest r = new RecordRequest();
                r.RecordID = id;

                RecordResponse <LeavePayment> response = _payrollService.ChildGetRecord <LeavePayment>(r);
                if (!response.Success)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    Common.errorMessage(response);
                    return;
                }



                //employeeId.SuspendEvent("Change");
                employeeId.GetStore().Add(new object[]
                {
                    new
                    {
                        recordId = response.result.employeeId,
                        fullName = response.result.employeeName
                    }
                });
                employeeId.SetValue(response.result.employeeId);
                //employeeId.ResumeEvent("Change");
                //effectiveDate.SuspendEvent("Change");
                effectiveDate.SetValue(response.result.effectiveDate);
                //effectiveDate.ResumeEvent("Change");
                leaveBalance.Text = response.result.leaveBalance.ToString();

                this.BasicInfoTab.SetValues(response.result);
                updateLeaveBalance.Text = "true";

                EmployeeQuickViewRecordRequest qvReq = new EmployeeQuickViewRecordRequest();

                qvReq.RecordID = response.result.employeeId.ToString();;


                qvReq.asOfDate = response.result.effectiveDate;

                RecordResponse <EmployeeQuickView> qvResp = _employeeService.ChildGetRecord <EmployeeQuickView>(qvReq);
                if (!qvResp.Success)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, qvResp.Summary).Show();
                }


                leavePayments.Text = qvResp.result.leavePayments != null?qvResp.result.leavePayments.ToString() : "0";



                //if (!response.result.effectiveDate.HasValue)
                //    effectiveDate.SelectedDate = DateTime.Now;
                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 "colAttach":

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

            default:
                break;
            }
        }
示例#8
0
        protected void PoPuP(object sender, DirectEventArgs e)
        {
            try {
                string type         = e.ExtraParams["type"];
                string edTypeP      = e.ExtraParams["edType"];
                string timeCodeP    = e.ExtraParams["timeCode"];
                string edIdP        = e.ExtraParams["edId"];
                string apIdP        = e.ExtraParams["apId"];
                string gracePeriodP = e.ExtraParams["gracePeriod"];
                currentEDtype.Text = edTypeP;
                switch (type)
                {
                case "imgEdit":
                    //Step 1 : get the object from the Web Service

                    //Step 2 : call setvalues with the retrieved object

                    TimeCodeRecordRequest r = new TimeCodeRecordRequest();
                    r.timeCode = timeCodeP;
                    RecordResponse <TimeCode> response = _payrollService.ChildGetRecord <TimeCode>(r);
                    if (!response.Success)
                    {
                        X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                        Common.errorMessage(response);
                        return;
                    }
                    FillApprovalStory();
                    FillensStore();
                    timeCodeStore.DataSource = Common.XMLDictionaryList(_systemService, "3");
                    timeCodeStore.DataBind();
                    this.BasicInfoTab.Reset();
                    //Step 2 : call setvalues with the retrieved object
                    this.BasicInfoTab.SetValues(response.result);
                    if (!String.IsNullOrEmpty(timeCodeP))
                    {
                        timecode.Select(timeCodeP);
                    }
                    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})", ),
                            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;
                }
            }
            catch (Exception exp)
            {
                X.Msg.Alert(Resources.Common.Error, exp.Message).Show();
            }
        }