/// <summary>
        /// 更新银行信息
        /// </summary>
        /// <param name="bank">银行信息对象</param>
        /// <returns></returns>
        public string UpdBank(T_Bank bank)
        {
            bank.C_GUID = Session["CurrentCompany"].ToString();
            bool   result = new BankAccountSvc().UpdBank(bank);
            string msg    = string.Empty;

            if (result)
            {
                msg = General.Resource.Common.Success;
            }
            else
            {
                msg = General.Resource.Common.Failed;
            }
            return(string.Format("{{\"Result\":{0},\"Msg\":\"{1}\"}}"
                                 , result.ToString().ToLower(), msg));
        }
Пример #2
0
        /// <summary>
        /// 更新银行信息
        /// </summary>
        /// <param name="bank">银行对象</param>
        /// <returns></returns>
        public bool UpdBank(T_Bank bank)
        {
            DBHelper dh = new DBHelper();

            dh.strCmd = "SP_UpdBank";
            dh.AddPare("@B_GUID", SqlDbType.NVarChar, 40, bank.B_GUID);
            dh.AddPare("@C_GUID", SqlDbType.NVarChar, 40, bank.C_GUID);
            dh.AddPare("@Name", SqlDbType.NVarChar, 100, bank.Name);
            try
            {
                dh.NonQuery();
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }