Exemplo n.º 1
0
        public Object CheckSignIn(Account acc)
        {
            int          result       = new CoffeeDAO().CheckSignIn(acc);
            Account      account      = new CoffeeDAO().GetAccount(acc.IdAccount);
            AccountCheck accountCheck = new AccountCheck(account, result);

            return((Object)accountCheck);
        }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         string GetAction = Request["Action"] + "";
         if (Request["ShowRegis"] == "show")
         {
             Page.ClientScript.RegisterStartupScript(this.GetType(), "Key", "<script>$('.A_PhoneRegis,.A_defaultRegis').show(); </script>");
         }
         if (GetAction == "AcccountSwich")
         {
             defaultlogin.Visible = false;
             Phonelogin.Visible   = false;
             AccountCheck Acheck = Session["UserModel"] as AccountCheck;
             if (Acheck != null)
             {
                 LoginBox2.Attributes["class"] = "";
                 if (Acheck.IsAccountCheck)
                 {
                     if (!Acheck.IsPhoneLogin)
                     {
                         LoginHTML(Acheck.UsersID, 1);
                     }
                     else
                     {
                         List <Hi.Model.SYS_Users> ListUsers = Acheck.ListUser;
                         string Userid = string.Join(",", ListUsers.Select(T => T.ID));
                         LoginHTML(Userid, 0);//0手机登录
                     }
                 }
                 else
                 {
                     Response.Write("请通过用户验证后,再进行帐号切换。");
                     Response.End();
                 }
             }
             else
             {
                 Response.Write("请通过用户验证后,再进行帐号切换。");
                 Response.End();
             }
         }
         else
         {
             Phonelogin.Attributes.Add("style", "margin-top:30px;display: none;");
             defaultlogin.Attributes.Add("style", "margin-top:30px;");
         }
     }
 }
 public IValidationResult NotificationRecipient(NotificationRecipient notificationRecipient)
 {
     return(AccountCheck.NotificationRecipient(notificationRecipient));
 }
 public IValidationResult SubscriptionPlan(SubscriptionPlan subscriptionPlan)
 {
     return(AccountCheck.SubscriptionPlan(subscriptionPlan));
 }
 public IValidationResult SettingProfile(SettingProfile settingProfile)
 {
     return(AccountCheck.SettingProfile(settingProfile));
 }
 public IValidationResult AccessCode(AccessCode accessCode)
 {
     return(AccountCheck.AccessCode(accessCode));
 }
 public IValidationResult Account(Account account)
 {
     return(AccountCheck.Account(account));
 }
Exemplo n.º 8
0
        private void btnConfirm_Click(object sender, RoutedEventArgs e)
        {
            List <string> errorList = new List <string>();

            PageViewUtils.GetErrors(errorList, grdForm);

            List <int> wealthySources = new List <int>();

            if (_pageVM.WealthySource1)
            {
                wealthySources.Add(1);
            }
            if (_pageVM.WealthySource2)
            {
                wealthySources.Add(2);
            }
            if (_pageVM.WealthySource3)
            {
                wealthySources.Add(3);
            }
            if (_pageVM.WealthySource4)
            {
                wealthySources.Add(4);
            }
            if (_pageVM.WealthySource5)
            {
                wealthySources.Add(5);
            }
            if (_pageVM.WealthySource6)
            {
                wealthySources.Add(6);
            }

            if (wealthySources.Count == 0)
            {
                errorList.Add("財富來源1~6項目至少需勾選一項");
            }

            if (_pageVM.WealthySource1 && !_pageVM.WealthySource1A && !_pageVM.WealthySource1B)
            {
                errorList.Add("1就業所得右方項目至少需勾選一項");
            }

            if (_pageVM.WealthySource1B && string.IsNullOrEmpty(_pageVM.WealthySource1BDesc))
            {
                errorList.Add("勾選1B營業收入經營年期未填寫");
            }

            if (_pageVM.WealthySource2 && !_pageVM.WealthySource2A && !_pageVM.WealthySource2B && !_pageVM.WealthySource2C && !_pageVM.WealthySource2D && !_pageVM.WealthySource2E)
            {
                errorList.Add("2投資孳息右方項目至少需勾選一項");
            }

            if (_pageVM.WealthySource2E && string.IsNullOrEmpty(_pageVM.WealthySource2EDesc))
            {
                errorList.Add("勾選2E投資孳息E其他說明欄位未填寫");
            }

            if (_pageVM.WealthySource3 && !_pageVM.WealthySource3A && !_pageVM.WealthySource3B && !_pageVM.WealthySource3C && !_pageVM.WealthySource3D && !_pageVM.WealthySource3E)
            {
                errorList.Add("3出售右方項目至少需勾選一項");
            }

            if (_pageVM.WealthySource6 && string.IsNullOrEmpty(_pageVM.WealthySource6Desc))
            {
                errorList.Add("勾選6其他說明欄位未填寫");
            }

            if (_pageVM.StampRefNumber && string.IsNullOrEmpty(_pageVM.StampRefNumberDesc))
            {
                errorList.Add("印鑑參照號碼未填寫");
            }

            if (_pageVM.StampRefNumber)
            {
                AccountCheck accChk = new AccountCheck();

                string actno = _pageVM.BranchNo + _pageVM.StampRefNumberDesc;

                string errMsg = accChk.Validate(actno);
                if (errMsg != "")
                {
                    errorList.Add("印鑑參照帳號檢核錯誤");
                    _kernelService.Logger.Error($"印鑑參照帳號({actno})檢核錯誤: {errMsg}");
                }
            }

            if (errorList.Count > 0)
            {
                ScalingModal sm    = new ScalingModal(MainGrid, InnerGrid);
                var          popup = new ValidationErrorDialog(errorList.ToArray(), sm);
                sm.Expand(popup, ScalingModalExpandCollapseAnimation.SlideB);
            }
            else
            {
                _pageVM.StopTimer();

                List <string> wealthySourceNames = new List <string>();

                if (_pageVM.WealthySource1)
                {
                    string desc = "就業所得";
                    if (_pageVM.WealthySource1A)
                    {
                        desc += "-薪資";
                    }
                    else if (_pageVM.WealthySource1B)
                    {
                        desc += "-營業收入(" + _pageVM.WealthySource1BDesc + ")年";
                    }

                    wealthySourceNames.Add(desc);
                }
                if (_pageVM.WealthySource2)
                {
                    string desc = "投資孳息";
                    if (_pageVM.WealthySource2A)
                    {
                        desc += "-股利";
                    }
                    else if (_pageVM.WealthySource2B)
                    {
                        desc += "-利息";
                    }
                    else if (_pageVM.WealthySource2C)
                    {
                        desc += "-租賃收入";
                    }
                    else if (_pageVM.WealthySource2D)
                    {
                        desc += "-藝術品";
                    }
                    else if (_pageVM.WealthySource2E)
                    {
                        desc += "-其他(" + _pageVM.WealthySource2EDesc + ")";
                    }

                    wealthySourceNames.Add(desc);
                }
                if (_pageVM.WealthySource3)
                {
                    string desc = "出售";
                    if (_pageVM.WealthySource3A)
                    {
                        desc += "-營業";
                    }
                    else if (_pageVM.WealthySource3B)
                    {
                        desc += "投資";
                    }
                    else if (_pageVM.WealthySource3C)
                    {
                        desc += "-財產(動產/不動產)";
                    }
                    else if (_pageVM.WealthySource3D)
                    {
                        desc += "-股票";
                    }
                    else if (_pageVM.WealthySource3E)
                    {
                        desc += "-保險收益結算";
                    }

                    wealthySourceNames.Add(desc);
                }
                if (_pageVM.WealthySource4)
                {
                    wealthySourceNames.Add("退休金");
                }
                if (_pageVM.WealthySource5)
                {
                    wealthySourceNames.Add("繼承/家庭贈與");
                }
                if (_pageVM.WealthySource6)
                {
                    wealthySourceNames.Add($"其他({_pageVM.WealthySource6Desc})");
                }

                string wealthySourceDesc = string.Join("、", wealthySourceNames.ToArray());

                string wealthySrc1Other   = "";
                string wealthySrc1SubCode = GetWealthySourceSubCode(wealthySources[0], out wealthySrc1Other);

                string wealthySrc2Other   = "";
                string wealthySrc2SubCode = wealthySources.Count > 1 ? GetWealthySourceSubCode(wealthySources[1], out wealthySrc2Other) : "";

                string wealthySrc3Other   = "";
                string wealthySrc3SubCode = wealthySources.Count > 2 ? GetWealthySourceSubCode(wealthySources[2], out wealthySrc3Other) : "";

                var model = new
                {
                    WealthySource1        = _pageVM.WealthySource1 ? "Y" : "N",
                    WealthySource1A       = _pageVM.WealthySource1A ? "Y" : "N",
                    WealthySource1B       = _pageVM.WealthySource1B ? "Y" : "N",
                    WealthySource1BDesc   = _pageVM.WealthySource1B ? _pageVM.WealthySource1BDesc : "",
                    WealthySource2        = _pageVM.WealthySource2 ? "Y" : "N",
                    WealthySource2A       = _pageVM.WealthySource2A ? "Y" : "N",
                    WealthySource2B       = _pageVM.WealthySource2B ? "Y" : "N",
                    WealthySource2C       = _pageVM.WealthySource2C ? "Y" : "N",
                    WealthySource2D       = _pageVM.WealthySource2D ? "Y" : "N",
                    WealthySource2E       = _pageVM.WealthySource2E ? "Y" : "N",
                    WealthySource2EDesc   = _pageVM.WealthySource2E ? _pageVM.WealthySource2EDesc : "",
                    WealthySource3        = _pageVM.WealthySource3 ? "Y" : "N",
                    WealthySource3A       = _pageVM.WealthySource3A ? "Y" : "N",
                    WealthySource3B       = _pageVM.WealthySource3B ? "Y" : "N",
                    WealthySource3C       = _pageVM.WealthySource3C ? "Y" : "N",
                    WealthySource3D       = _pageVM.WealthySource3D ? "Y" : "N",
                    WealthySource3E       = _pageVM.WealthySource3E ? "Y" : "N",
                    WealthySource4        = _pageVM.WealthySource4 ? "Y" : "N",
                    WealthySource5        = _pageVM.WealthySource5 ? "Y" : "N",
                    WealthySource6        = _pageVM.WealthySource6 ? "Y" : "N",
                    WealthySource6Desc    = _pageVM.WealthySource6 ? _pageVM.WealthySource6Desc : "",
                    StampRefNumber        = _pageVM.StampRefNumber ? "Y" : "N",
                    StampRefNumberDesc    = _pageVM.StampRefNumber ? _pageVM.StampRefNumberDesc : "",
                    StampRefNumberEnabled = _pageVM.StampRefNumberEnabled ? "Y" : "N",
                    HasOldAccount         = _pageVM.HasOldAccount ? "Y" : "N",
                    IsPreProcAccount      = _pageVM.IsPreProcAccount ? "Y" : "N",
                    _pageVM.AccountType,
                    IsShowStampMsg = _pageVM.IsShowStampMsg ? "Y" : "N",

                    WealthySource1Code    = wealthySources[0].ToString(),
                    WealthySource1SubCode = wealthySrc1SubCode,
                    WealthySource1Other   = wealthySrc1Other,
                    WealthySource2Code    = wealthySources.Count > 1 ? wealthySources[1].ToString() : "",
                    WealthySource2SubCode = wealthySrc2SubCode,
                    WealthySource2Other   = wealthySrc2Other,
                    WealthySource3Code    = wealthySources.Count > 2 ? wealthySources[2].ToString() : "",
                    WealthySource3SubCode = wealthySrc3SubCode,
                    WealthySource3Other   = wealthySrc3Other,
                    WealthySourceDesc     = wealthySourceDesc,
                    StampRefAccNo         = _pageVM.StampRefNumber ? _pageVM.BranchNo + _pageVM.StampRefNumberDesc : ""
                };

                string json = JsonConvert.SerializeObject(model);
                _kernelService.TransactionDataCache.Set(KioskDataCacheKey.PersonalData177, json);

                _pageVM.Clear();

                PageResult result = new PageResult("Confirm", KioskDataCacheKey.PersonalData177);
                _kernelService.NextPage(result);
            }
        }