首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

新建的时分给文本框附值(自己记录的备忘)

2012-10-18 
新建的时候给文本框附值(自己记录的备忘)?前台JS: //#region获取供应商的开户银行和账号-jun-2011-6-20-10

新建的时候给文本框附值(自己记录的备忘)

?
前台JS:
//#region获取供应商的开户银行和账号-jun-2011-6-20-10:00-
??????????????????????? var finance_check_setBankAccount = Ext.lib.Ajax.getConnectionObject().conn;
??????????????????????? finance_check_setBankAccount.open("GET", 'BLL/ModuleBusiness/Finance/Operation.aspx?cmd=SetBankAccount&id=' + finance_check_ContractId, false);
??????????????????????? finance_check_setBankAccount.send(null);
??????????????????????? if (finance_check_setBankAccount.status == "200") {
??????????????????????????? finance_check_BankAccount_obj = Ext.decode(finance_check_setBankAccount.responseText);//把返回的json串转化为对象
??????????????????????????? finance_check_actualFormPanel.form.findField('BANK').setValue(finance_check_BankAccount_obj.BANK);
??????????????????????????? finance_check_actualFormPanel.form.findField('ACCOUNT').setValue(finance_check_BankAccount_obj.ACCOUNT);
??????????????????????? } else {
??????????????????????????? Ext.MessageBox.alert(WooI18N.ModuleBusiness.Finance.Order.FinanceCheck.Warning, WooI18N.ModuleBusiness.Finance.Order.FinanceCheck.WarningContent);
??????????????????????? }//#endregion获取供应商的开户银行和账号-jun-2011-6-20-10:00-
前台BLL:
CRUD finance = new CRUD();
? switch (Request["cmd"])
???????????? {
??????????????????????? // 取得供应商开户银行及账号
??????????????????????? case "SetBankAccount":
??????????????????????????? var contractId = Request["id"];
??????????????????????????? Response.Write(finance.GetSupplierBankAndAccount(contractId));
??????????????????????????? break;
??? }
后台CRUD:
??????? /// <summary>
??????? /// 取得供应商的开户银行及账号
??????? /// </summary>
??????? /// <param name="contractId">The contract id.</param>
??????? /// <returns></returns>
??????? /// <remark>Create by 苏?杨?周ü 2011-06-16 </remark>
??????? /// <remark>Copyright 2011 Woorich</remark>
??????? public string GetSupplierBankAndAccount(string contractId)
??????? {
??????????? DAL.DALFactory dal = new DALFactory();
??????????? return dal.GetSupplierBankAndAccount(contractId);
??????? }
后台DAL:
??????? /// <summary>
??????? ///取得供应商的开户银行及账号
??????? /// </summary>
??????? /// <param name="contractId">The contract id.</param>
??????? /// <returns></returns>
??????? /// <remark>2011-06-16 </remark>
??????? /// <remark>Copyright 2011 Woorich</remark>
??????? public string GetSupplierBankAndAccount(string contractId)
??????? {
??????????? WCMSDATA wd = DataEntity.Initializes();
??????????? Int32 contractIntId = 0;
??????????? if (Int32.TryParse(contractId, out contractIntId))
??????????? {
??????????????? var contract = wd.WOO_CONTRACT.Where(p => p.ID == Convert.ToInt32(contractId));
??????????????? if (contract.Count() > 0)
??????????????? {
??????????????????? var supplier = contract.First().WOO_COMPANY;
??????????????????? var query = new
??????????????????? {
??????????????????????? BANK = supplier.BANK,
??????????????????????? ACCOUNT = supplier.ACCOUNT
??????????????????? };
??????????????????? return query.ToJSON().TrimStart('[').TrimEnd(']');
??????????????? }
??????????? }
??????????? return "NO";
??????? }

热点排行