Beispiel #1
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);
            }
        }