Пример #1
0
        /// <summary>设置资金账户是否主账户
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void CB_IsMain_OnCheckedChanged(object sender, EventArgs e)
        {
            var cbIsMain       = (OverwriteCheckBox)sender;
            var dataItem       = (GridDataItem)cbIsMain.Parent.Parent;
            var bankAccountsId = dataItem.GetDataKeyValue("BankAccountsId");
            var result         = _bankAccountsWrite.SetBankAccountsIsMain(new Guid(bankAccountsId.ToString()), cbIsMain.Checked);

            if (result)
            {
                //镜拓暂不同步
                var list = CacheCollection.Filiale.GetList().Where(ent => ent.FilialeTypes.Contains((int)FilialeType.SaleCompany) && ent.ID != new Guid("43609645-97dd-4ae4-989d-f3c867969a99"));
                foreach (var filialeInfo in list)
                {
                    B2CSao.SetBankAccountsIsMain(filialeInfo.ID, new Guid(bankAccountsId.ToString()), true);
                }
            }
            RG_BankWebSite.Rebind();
        }