예제 #1
0
        /// <summary>
        /// 获取公司银行列表
        /// </summary>
        /// <param name="companyID"></param>
        /// <returns></returns>
        private string GetCompanyBankList(int companyID)
        {
            DataTable dtBankList = ComBankManager.getList(companyID);

            StringBuilder htmlBuilder = new StringBuilder();

            EtNet_Models.Company company = CompanyManager.getCompanyById(companyID);

            if (company != null)
            {
                htmlBuilder.AppendFormat("<option value=\"{0}\">", company.CardId + "$" + company.CardName + "$" + company.Remark);
                //htmlBuilder.Append("<option value=\"0\">");
                htmlBuilder.Append(company.Bank);
                htmlBuilder.Append("</option>");
            }

            if (dtBankList.Rows.Count > 0)
            {
                int rowCount = dtBankList.Rows.Count;
                for (int i = 0; i < rowCount; i++)
                {
                    DataRow currentRow = dtBankList.Rows[i];
                    htmlBuilder.AppendFormat("<option value=\"{0}\">", currentRow["id"]);
                    htmlBuilder.Append(currentRow["bank"]);
                    htmlBuilder.Append("</option>");
                }
            }

            return(htmlBuilder.ToString());
        }
예제 #2
0
        private void loadCom()
        {
            string id = Request.QueryString["id"].ToString();

            EtNet_Models.Company company = CompanyManager.getCompanyById(Convert.ToInt32(id));
            //基本信息
            this.lblcomcode.Text = company.ComCode.ToString();

            if (company.ComType == 0)
            {
                this.lblcomtype.Text = "暂未选择类别";
            }
            else
            {
                this.lblcomtype.Text = ComTypeManager.getComTypeById(company.ComType).TypeName.ToString();
            }

            if (company.Used == 0)
            {
                this.lblused.Text = "暂未启用";
            }
            else
            {
                this.lblused.Text = "已启用";
            }


            this.lbladdress.Text    = company.Province.ToString() + " " + company.City.ToString() + " ";
            this.lblcname.Text      = company.ComCname.ToString() + " ";
            this.lblcompanyurl.Text = company.ComUrl.ToString() + " ";

            this.lblcaddress.Text = company.ComCAddress.ToString() + " ";
            this.lblshort.Text    = company.ComShortName.ToString() + " ";

            //主要联系人
            this.lbllinkname.Text   = company.LinkName.ToString() + " ";
            this.lbllinkpost.Text   = company.Post.ToString() + " ";
            this.lbllinkfax.Text    = company.Fax.ToString() + " ";
            this.lbllinkemail.Text  = company.Email.ToString() + " ";
            this.lbllinkmobile.Text = company.Mobile.ToString() + " ";
            this.lbllinktel.Text    = company.Telephone.ToString() + " ";
            this.lbllinkskype.Text  = company.Skype.ToString() + " ";
            this.lbllinkmsn.Text    = company.Msn.ToString() + " ";

            //主要银行信息
            this.lblbank.Text     = company.Bank.ToString() + " ";
            this.lblbankcard.Text = company.CardId.ToString() + " ";
            this.lblbankman.Text  = company.CardName.ToString() + " ";
            this.lblremark.Text   = company.Remark.ToString() + " ";
            this.lblMadeFrom.Text = LoginInfoManager.getLoginInfoById(company.Madefrom).Cname;
            this.lblMadeTime.Text = company.MadeTime.ToString("yyyy-MM-dd");

            loadOtherLink();
            loadOtherBank();
        }
예제 #3
0
        /// <summary>
        /// 绑定公司银行列表
        /// </summary>
        private void FillCompanyBank(DataTable dtBankList, int companyID)
        {
            EtNet_Models.Company company = CompanyManager.getCompanyById(companyID);

            if (company != null && company.Bank.Trim() != string.Empty)
            {
                DataRow newRow = dtBankList.NewRow();

                newRow["bankId"]      = 0;
                newRow["bankName"]    = company.Bank;// string.Format("{0}(主银行)", company.Bank);
                newRow["bankAccount"] = company.CardId;
                newRow["bankUser"]    = company.CardName;
                newRow["bankMark"]    = company.Remark;

                dtBankList.Rows.Add(newRow);
            }

            DataTable dtCompanyBankList = ComBankManager.getList(companyID);

            if (dtCompanyBankList.Rows.Count > 0)
            {
                int rowCount = dtCompanyBankList.Rows.Count;
                for (int i = 0; i < rowCount; i++)
                {
                    DataRow currentRow = dtCompanyBankList.Rows[i];
                    DataRow newRow     = dtBankList.NewRow();

                    newRow["bankId"]      = currentRow["id"];
                    newRow["bankName"]    = currentRow["bank"];
                    newRow["bankAccount"] = currentRow["cardId"];
                    newRow["bankUser"]    = currentRow["cardName"];
                    newRow["bankMark"]    = currentRow["remark"];

                    dtBankList.Rows.Add(newRow);
                }
            }
        }