Beispiel #1
0
        void OnButtonClick(object sender, ButtonClickEventArgs e)
        {
            switch (e.Type)
            {
                case ButtonType.UnifiOthersPlanCompleted:
                    ShowForm(UserControlType.DocumentUpload);
                    break;
                case ButtonType.UnifiHyppTvCompleted:
                    ShowForm(UserControlType.UnifiOthersPlan);
                    break;
                case ButtonType.UnifiCallPlanCompleted:
                    ShowForm(UserControlType.UnifiHyppTv);
                    break;
                case ButtonType.UnifiMainDetailsCompleted:
                    ShowForm(UserControlType.UnifiCallPlan);
                    break;
                case ButtonType.DocumentUploadCompleted:
                    ShowForm(UserControlType.TermAndCondition);
                    break;
                case ButtonType.ServicesCompleted:
                    ShowForm(UserControlType.DocumentUpload);
                    break;
                case ButtonType.BillingCompleted:
                    switch (Application.ProductTypeEnum)
                    {
                        case ProductTypeEnum.Unifi:
                            ShowForm(UserControlType.UnifiMainDetails);
                            break;
                        case ProductTypeEnum.Streamyx:
                            ShowForm(UserControlType.ServiceDetails);
                            break;
                    }
                    break;
                case ButtonType.ApplicationDetailCompleted:
                    ShowForm(UserControlType.InstallationDetail);
                    break;
                case ButtonType.InstallationDetailCompleted:
                    ShowForm(UserControlType.BillingDetail);
                    break;
                case ButtonType.BillingDetailCompleted:
                    ShowForm(UserControlType.ServiceDetails);
                    break;
                case ButtonType.ApplicantTypeSelected:
                    {
                        switch (Application.ApplicantTypeEnum)
                        {
                            case ApplicantTypeEnum.Malaysian:
                                ShowForm(UserControlType.ApplicantDetails);
                                break;
                            case ApplicantTypeEnum.NonMalaysian:
                                ShowForm(UserControlType.ApplicantDetails);
                                break;
                            case ApplicantTypeEnum.Oku:
                                ShowForm(UserControlType.ApplicantDetails);
                                //MessageBox.Show("Test");
                                break;
                            case ApplicantTypeEnum.Tentera:
                                ShowForm(UserControlType.ApplicantDetails);
                                //MessageBox.Show("Test");
                                break;
                            default:
                                break;
                        }
                    }
                    break;
                case ButtonType.Syncrhonize:
                    ProcessingForm pf = new ProcessingForm();
                    pf.Title = "Synchronization";
                    pf.Message = "Synchronization is in progress...";
                    pf.ShowDialog();
                    break;
                case ButtonType.Dashboard:
                    ShowForm(UserControlType.Dashboard);
                    break;
                case ButtonType.SaveTrans:
                    {
                        try
                        {

                            //Models.ApplicationModel.Add(Application, UserProfile.IcNo);
                            _applicationSvc.Create(Application);
                            MessageBox.Show("Registration Success!");
                            RegistrationSlipForm rsf = new RegistrationSlipForm();
                            rsf.Trans = Application;
                            rsf.Show();
                            ShowForm(UserControlType.Dashboard);

                        }
                        catch (Exception ex)
                        {
                            MessageBox.Show("Registration Failed! " + ex.Message);
                        }
                    }
                    break;
                case ButtonType.Start:
                    Application = new Data.Application();
                    ShowForm(UserControlType.ProductGroup);
                    break;
                case ButtonType.ApplicantType:
                    ShowForm(UserControlType.ApplicantType);
                    break;
                case ButtonType.RecentApplication:
                    ShowForm(UserControlType.RecentApplication);
                    break;
                case ButtonType.IncompleteApplication:
                    ShowForm(UserControlType.IncompleteApplication);
                    break;
                case ButtonType.MyPerformance:
                    MyPerformanceForm mpf = new MyPerformanceForm();
                    mpf.Show();
                    break;
                default:
                    break;
            }
            //switch (e.Type)
            //{
            //    case ButtonType.RecentApplication:
            //        ShowForm(UserControlType.RecentApplication);
            //        break;
            //    case ButtonType.IncompleteApplication:
            //        ShowForm(UserControlType.IncompleteApplication);
            //        break;
            //    default:
            //        ShowForm(UserControlType.ProductGroup);
            //        break;
            //}
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            RegistrationSlipForm rsf = new RegistrationSlipForm();

            rsf.Show();
        }
Beispiel #3
0
        void OnButtonClick(object sender, ButtonClickEventArgs e)
        {
            switch (e.Type)
            {
            case ButtonType.UnifiOthersPlanCompleted:
                ShowForm(UserControlType.DocumentUpload);
                break;

            case ButtonType.UnifiHyppTvCompleted:
                ShowForm(UserControlType.UnifiOthersPlan);
                break;

            case ButtonType.UnifiCallPlanCompleted:
                ShowForm(UserControlType.UnifiHyppTv);
                break;

            case ButtonType.UnifiMainDetailsCompleted:
                ShowForm(UserControlType.UnifiCallPlan);
                break;

            case ButtonType.DocumentUploadCompleted:
                ShowForm(UserControlType.TermAndCondition);
                break;

            case ButtonType.ServicesCompleted:
                ShowForm(UserControlType.DocumentUpload);
                break;

            case ButtonType.BillingCompleted:
                switch (Application.ProductTypeEnum)
                {
                case ProductTypeEnum.Unifi:
                    ShowForm(UserControlType.UnifiMainDetails);
                    break;

                case ProductTypeEnum.Streamyx:
                    ShowForm(UserControlType.ServiceDetails);
                    break;
                }
                break;

            case ButtonType.ApplicationDetailCompleted:
                ShowForm(UserControlType.InstallationDetail);
                break;

            case ButtonType.InstallationDetailCompleted:
                ShowForm(UserControlType.BillingDetail);
                break;

            case ButtonType.BillingDetailCompleted:
                ShowForm(UserControlType.ServiceDetails);
                break;

            case ButtonType.ApplicantTypeSelected:
            {
                switch (Application.ApplicantTypeEnum)
                {
                case ApplicantTypeEnum.Malaysian:
                    ShowForm(UserControlType.ApplicantDetails);
                    break;

                case ApplicantTypeEnum.NonMalaysian:
                    ShowForm(UserControlType.ApplicantDetails);
                    break;

                case ApplicantTypeEnum.Oku:
                    ShowForm(UserControlType.ApplicantDetails);
                    //MessageBox.Show("Test");
                    break;

                case ApplicantTypeEnum.Tentera:
                    ShowForm(UserControlType.ApplicantDetails);
                    //MessageBox.Show("Test");
                    break;

                default:
                    break;
                }
            }
            break;

            case ButtonType.Syncrhonize:
                ProcessingForm pf = new ProcessingForm();
                pf.Title   = "Synchronization";
                pf.Message = "Synchronization is in progress...";
                pf.ShowDialog();
                break;

            case ButtonType.Dashboard:
                ShowForm(UserControlType.Dashboard);
                break;

            case ButtonType.SaveTrans:
            {
                try
                {
                    //Models.ApplicationModel.Add(Application, UserProfile.IcNo);
                    _applicationSvc.Create(Application);
                    MessageBox.Show("Registration Success!");
                    RegistrationSlipForm rsf = new RegistrationSlipForm();
                    rsf.Trans = Application;
                    rsf.Show();
                    ShowForm(UserControlType.Dashboard);
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Registration Failed! " + ex.Message);
                }
            }
            break;

            case ButtonType.Start:
                Application = new Data.Application();
                ShowForm(UserControlType.ProductGroup);
                break;

            case ButtonType.ApplicantType:
                ShowForm(UserControlType.ApplicantType);
                break;

            case ButtonType.RecentApplication:
                ShowForm(UserControlType.RecentApplication);
                break;

            case ButtonType.IncompleteApplication:
                ShowForm(UserControlType.IncompleteApplication);
                break;

            case ButtonType.MyPerformance:
                MyPerformanceForm mpf = new MyPerformanceForm();
                mpf.Show();
                break;

            default:
                break;
            }
            //switch (e.Type)
            //{
            //    case ButtonType.RecentApplication:
            //        ShowForm(UserControlType.RecentApplication);
            //        break;
            //    case ButtonType.IncompleteApplication:
            //        ShowForm(UserControlType.IncompleteApplication);
            //        break;
            //    default:
            //        ShowForm(UserControlType.ProductGroup);
            //        break;
            //}
        }
Beispiel #4
0
 private void button1_Click(object sender, EventArgs e)
 {
     RegistrationSlipForm rsf = new RegistrationSlipForm();
     rsf.Show();
 }