示例#1
0
        private async void CheckBank()
        {
            var idCard = tbIdCard.Text.Trim();

            idCard = Commons.ShowInputDialog(this, "请输入身份证号:", "检查银行开户", 300, new Regex("^\\d{18}$|^\\d{17}(X|x)$|^\\d{15}$"), false, idCard).Trim();
            if (idCard == "")
            {
                return;
            }
            btnCheckBank.Enabled = false;
            var d = new Dictionary <string, object>();

            d["au-id"]   = m_auId;
            d["id-card"] = idCard;
            var p = await InvestPersons.CheckBank(d);

            if (p.IsOk)
            {
                if (p.AsBoolean)
                {
                    UpdateTable();
                    Commons.ShowInfoBox(this, "已开户");
                }
                else
                {
                    Commons.ShowInfoBox(this, "未开户");
                }
            }
            else
            {
                Commons.ShowResultErrorBox(this, p);
            }
            btnCheckBank.Enabled = true;
        }
示例#2
0
        private async void ChangeMobile()
        {
            var phone = Commons.ShowInputDialog(this, "请输入新手机号:", "修改手机号", 300,
                                                new Regex("^((11)|(12)|(13)|(14)|(15)|(16)|(17)|(18)|(19))\\d{9}$")).Trim();

            if (phone == "")
            {
                return;
            }

            var d = new Dictionary <string, object>();

            d["ci-id"]  = m_ciId;
            d["mobile"] = phone;

            var p = await CrmInvestor.ChangeMobile(d);

            if (p.IsOk)
            {
                UpdateTable();
            }
            else
            {
                Commons.ShowResultErrorBox(this, p);
            }
        }
示例#3
0
        private async void AssUpper()
        {
            var uname    = treeView1.SelectedNode.Text;
            var newUName = Commons.ShowInputDialog(this, string.Format("为客户经理 {0} 指定新的上级:", uname), "指定上级", 300).Trim();

            if (newUName == "")
            {
                return;
            }
            var d = new Dictionary <string, object>();

            d["p-name"] = newUName;
            d["u-name"] = uname;

            var p = await CrmInvestor.MoveManager(d);

            if (p.IsOk)
            {
                UpdateTable1();
            }
            else
            {
                Commons.ShowResultErrorBox(this, p);
            }
        }
示例#4
0
        private async void AccConfirm()
        {
            btnAccConfirm.Enabled = false;
            var cardId = Commons.ShowInputDialog(this, "请输入电子帐户号:", "确认开户", 300, new Regex("^\\d*$")).Trim();

            if (cardId == "")
            {
                btnAccConfirm.Enabled = true;
                return;
            }
            if (!Commons.ShowConfirmBox(this, "确认开户吗?", "开户"))
            {
                btnAccConfirm.Enabled = true;
                return;
            }
            var r = new Dictionary <string, object>();

            r["au-id"]   = m_auId;
            r["user-id"] = cardId;
            var p = await InvestOrgs.UpdateRegistry(r);

            if (p.IsOk)
            {
                UpdateTable();
            }
            else
            {
                Commons.ShowResultErrorBox(this, p);
            }
            btnAccConfirm.Enabled = true;
        }
        private async void Create()
        {
            var remark = Commons.ShowInputDialog(this, "备注(&R):", "创建商户转帐", 300);

            if (remark == "")
            {
                return;
            }
            var d = new Dictionary <string, object>();

            d["remark"] = remark;

            var p = await BusinessTransfers.SaveB2cDetail(d);

            if (p.IsOk)
            {
                myGridViewBinding1.BindTo(p, Commons.BindFlag.Update, "tbdId");
            }
            else
            {
                Commons.ShowResultErrorBox(this, p);
            }
        }
示例#6
0
        private async void EditRcode()
        {
            string newRcode = "";

            if (Commons.ShowConfirmBox(this, "确认修改编号嘛?", "编号"))
            {
                newRcode = Commons.ShowInputDialog(this, "请输入新编号(只能输入大写字母和数字):", "修改编号", 300, new Regex("^[A-Z\\d]{0,11}$"));
            }
            if (newRcode == "")
            {
                return;
            }

            var d = new Dictionary <string, object>();

            d["u-name"] = treeView1.SelectedNode.Text;
            d["r-code"] = newRcode;

            var p = await CrmInvestor.EditRCode(d);

            if (p.IsOk)
            {
                if (Convert.ToBoolean(p.AsString))
                {
                    UpdateTable1();
                    Commons.ShowInfoBox(this, "修改成功");
                }
                else
                {
                    Commons.ShowInfoBox(this, "修改失败");
                }
            }
            else
            {
                Commons.ShowResultErrorBox(this, p);
            }
        }
示例#7
0
        private async void UpdateTable2()
        {
            var text = tbComments.Text.LeftStr(500);

            if (rbNo.Checked)
            {
                if (text.Trim() == "")
                {
                    Commons.ShowInfoBox(this, "审批不通过时必须输入备注");
                    tbComments.Focus();
                    return;
                }
                if (m_status == 50 || m_status == 70)
                {
                    if (!Commons.ShowConfirmBox(this, "此时审批不通过会导致\"流标\"!确认吗?"))
                    {
                        return;
                    }
                }
            }

            if (rbYes.Checked && m_status == 50)
            {
                var p = await Projects.IsExistsUncheckedTender(m_pId);

                if (p.IsOk)
                {
                    if (p.AsInt > 0)
                    {
                        Commons.ShowWarnBox(this, string.Format("存在{0}个状态未知的投标,请检查投标", p.AsInt));
                        return;
                    }
                }
                else
                {
                    Commons.ShowResultErrorBox(this, p);
                }
            }

            if (m_status == 60)
            {
                var reservedAmt = Commons.ShowDecimalInputDialog(this, 0, "金额(&A)", "输入财务核收服务费", 200);
                if (reservedAmt == -1)
                {
                    return;
                }
                var p = new Dictionary <string, object>();
                p["pid"] = m_pId;
                p["amt"] = reservedAmt;

                var r = await Projects.SaveReservedAmt(p);

                if (!r.IsOk)
                {
                    Commons.ShowResultErrorBox(this, r);
                }
            }

            if (m_status == 70)
            {
                if (m_statusSign == 0)
                {
                    if (!Commons.ShowConfirmBox(this, "签章未完成,确认放款嘛?", "确认"))
                    {
                        return;
                    }
                }
                var password = Commons.ShowInputDialog(this, "密码(&P)", "操作人员身份验证", 200, null, true).Trim();
                if (password == "")
                {
                    return;
                }
                else if (!(await SignIn.ValidateUser(password)))
                {
                    Commons.ShowInfoBox(this, "密码错误,禁止操作!");
                    return;
                }
            }

            var isOk = rbYes.Visible ? rbYes.Checked : true;
            var p2   = new Dictionary <string, object>();

            p2["pid"]      = m_pId;
            p2["flag"]     = isOk;
            p2["comments"] = text;
            Rpc.IResult r2;
            switch (m_status)
            {
            case 0:
                r2 = await Projects.PrjSubmit(p2);

                break;

            case 1:
                r2 = await Projects.PrjMgrAudit(p2);

                break;

            case 10:
                r2 = await Projects.PrjRiskCtrlAudit(p2);

                break;

            case 20:
                r2 = await Projects.PrjBusSecAudit(p2);

                break;

            case 30:
                r2 = await Projects.PrjBusVpAprOnline(p2);

                break;

            case 50:
                r2 = await Projects.PrjBusVpConfirmFull(p2);

                break;

            case 60:
                r2 = await Projects.PrjCheckFee(p2);

                break;

            case 70:
                r2 = await Projects.PrjBusVpConfirmLoan(p2);

                break;

            default:
                return;
            }

            if (r2.IsOk)
            {
                if (!Convert.ToBoolean(r2.AsBoolean))
                {
                    Commons.ShowInfoBox(this, "业务操作失败!");
                }
            }
            else
            {
                Commons.ShowResultErrorBox(this, r2);
            }

            DialogResult = DialogResult.OK;
        }