Exemple #1
0
        private void ReloadDays()
        {
            AttendanceScheduleDayListRequest daysRequest = new AttendanceScheduleDayListRequest();

            daysRequest.ScheduleId = CurrentSchedule.Text;

            ListResponse <AttendanceScheduleDay> daysResponse = _branchService.ChildGetAll <AttendanceScheduleDay>(daysRequest);

            if (!daysResponse.Success)
            {
                X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                X.Msg.Alert(Resources.Common.Error, daysResponse.Summary).Show();
                return;
            }

            //Step 2 : call setvalues with the retrieved object
            scheduleDays.Store[0].DataSource = daysResponse.Items;
            scheduleDays.Store[0].DataBind();
        }
Exemple #2
0
        protected void PoPuP(object sender, DirectEventArgs e)
        {
            ScheduleNamelb.Text = e.ExtraParams["ScheduleNamePar"];
            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 = 0;
                RecordRequest r = new RecordRequest();
                r.RecordID = id.ToString();
                RecordResponse <AttendanceSchedule> response = _branchService.ChildGetRecord <AttendanceSchedule>(r);

                if (!response.Success)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    Common.errorMessage(response);
                    return;
                }
                ////Step 2 : call setvalues with the retrieved object
                BasicInfoTab.Reset();
                this.BasicInfoTab.SetValues(response.result);
                //_systemService.SessionHelper.Set("currentSchedule",r.RecordID);
                //// InitCombos(response.result);
                //    setDefaultBtn.Hidden = false;
                this.EditRecordWindow.Title = Resources.Common.EditWindowsTitle;
                this.EditRecordWindow.Show();
                //FillDow("1");



                break;

            case "imgAttach":
                //panelRecordDetails.ActiveIndex = 0;

                AttendanceScheduleDayListRequest daysRequest = new AttendanceScheduleDayListRequest();
                daysRequest.ScheduleId = id.ToString();

                ListResponse <AttendanceScheduleDay> daysResponse = _branchService.ChildGetAll <AttendanceScheduleDay>(daysRequest);
                if (!daysResponse.Success)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, daysResponse.Summary).Show();
                    return;
                }

                //Step 2 : call setvalues with the retrieved object
                scheduleDays.Store[0].DataSource = daysResponse.Items;
                scheduleDays.Store[0].DataBind();
                CurrentSchedule.Text = id.ToString();

                Viewport1.ActiveIndex = 1;
                // InitCombos(response.result);
                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;
            }
        }