Esempio n. 1
0
        private void loadcom()
        {
            string id = Request.QueryString["id"].ToString();

            EtNet_Models.Company com = CompanyManager.getCompanyById(Convert.ToInt32(id));

            this.comCName.Value = com.ComCname.ToString();
            //this.comCode.Value = com.ComCode.ToString();
            this.TxtType.Text      = ComTypeManager.getComTypeById(com.ComType).TypeName;
            this.HidTypeID.Value   = ComTypeManager.getComTypeById(com.ComType).Id.ToString();
            this.comCAddress.Value = com.ComCAddress.ToString();
            this.companyURL.Value  = com.ComUrl.ToString();
            this.address.Text      = com.Province.ToString() + " " + com.City.ToString();
            this.comshort.Value    = com.ComShortName.ToString();


            this.lblMadeFrom.Value = LoginInfoManager.getLoginInfoById(((LoginInfo)Session["Login"]).Id).Cname;
            this.lblMadeTime.Value = DateTime.Now.ToString("yyyy-MM-dd");
            //主要联系人
            this.linkName.Value   = com.LinkName.ToString();
            this.linkPost.Value   = com.Post.ToString();
            this.linkTel.Value    = com.Telephone.ToString();
            this.linkMobile.Value = com.Mobile.ToString();
            this.linkFax.Value    = com.Fax.ToString();
            this.linkEmail.Value  = com.Email.ToString();
            this.linkMsn.Value    = com.Msn.ToString();
            this.linkSkype.Value  = com.Skype.ToString();

            //主要银行信息
            this.bankName.Value   = com.Bank.ToString();
            this.bankCard.Value   = com.CardId.ToString();
            this.bankMan.Value    = com.CardName.ToString();
            this.bankremark.Value = com.Remark.ToString();
        }
Esempio n. 2
0
        //添加基本信息
        private void addupdateBase()
        {
            //基本信息
            EtNet_Models.Company com = new EtNet_Models.Company();
            com.ComCode = this.comCode.Value.ToString();

            string[] addre = this.address.Text.ToString().Split(' ');// string[] sailing = args.Split('/');
            com.Province = addre[0].ToString();
            com.City     = addre[1].ToString();


            com.ComShortName = this.comshort.Value.ToString();
            com.ComCname     = this.comCName.Value.ToString();
            com.ComUrl       = this.companyURL.Value.ToString();
            com.ComCAddress  = this.comCAddress.Value.ToString();

            com.ComType = Convert.ToInt32(this.HidTypeID.Value);

            com.Used = Convert.ToInt32(this.rbUsed.SelectedItem.Value);

            //联系人
            com.LinkName  = this.linkName.Value.ToString();
            com.Post      = this.linkPost.Value.ToString();
            com.Telephone = this.linkTel.Value.ToString();
            com.Mobile    = this.linkMobile.Value.ToString();
            com.Fax       = this.linkFax.Value.ToString();
            com.Email     = this.linkEmail.Value.ToString();
            com.Msn       = this.linkMsn.Value.ToString();
            com.Skype     = this.linkSkype.Value.ToString();

            //银行信息
            com.Bank     = this.bankName.Value.ToString();
            com.CardId   = this.bankCard.Value.ToString();
            com.CardName = this.bankMan.Value.ToString();
            com.Remark   = this.bankremark.Value.ToString();
            com.Id       = Convert.ToInt32(Request.QueryString["id"].ToString());

            com.Madefrom = ((LoginInfo)Session["login"]).Id;
            com.MadeTime = DateTime.Now;

            com.Ordernum   = "";
            com.Codeformat = "";

            int count = CompanyManager.updateCompany(com);

            if (count > 0)
            {
                addcomlink();
                addcombank();
                this.Page.ClientScript.RegisterStartupScript(this.GetType(), "", "alert('修改成功!');location.href='../InsureCompany/Insure.aspx'", true);
            }
        }