Пример #1
0
        protected void Rg_BankWebSite_InsertCommand(object sender, GridCommandEventArgs e)
        {
            var editedItem     = (GridEditableItem)e.Item;
            var bankAccountsId = new Guid(((DropDownList)editedItem.FindControl("DDL_Bank")).SelectedValue);

            TargetId = new Guid(RTVWebSite.SelectedValue);
            var bwInfo = new BankAccountInfo
            {
                BankAccountsId = bankAccountsId,
                TargetId       = TargetId
            };

            try
            {
                _bankAccountsWrite.InsertBindBankAccounts(TargetId, bankAccountsId);
            }
            catch
            {
                RAM.Alert("插入该资金账户失败!");
            }
            if (CacheCollection.SalePlatform.Get(bwInfo.TargetId) != null || CacheCollection.Filiale.IsB2CFiliale(bwInfo.TargetId))
            {
                try
                {
                    B2CSao.AddBankAccountBinding(bwInfo.TargetId, bwInfo.BankAccountsId);
                }
                catch (Exception exp)
                {
                    RAM.Alert("同步失败,错误信息:" + exp.Message);
                }
            }
        }