public void ShowAccountInfo(string strID)
        {
            ///账户信息
            DAL.SYS.AccountDAL dal = new DAL.SYS.AccountDAL();
            DataSet            ds  = dal.GetAccountByID(strID);

            Model.SYS.SYS_Account model = DataConvert.DataRowToModel <Model.SYS.SYS_Account>(ds.Tables[0].Rows[0]);
            this.txtID.Value            = model.ID;
            this.txtAccountID.Text      = model.LoginName;
            this.ddlAgent.SelectedIndex = this.ddlAgent.Items.IndexOf(this.ddlAgent.Items.FindByValue(model.AgentID));
            this.txtAccountName.Text    = model.Name;
            this.ddlRole.SelectedIndex  = this.ddlRole.Items.IndexOf(this.ddlRole.Items.FindByValue(model.RoleID));
            this.txtEmail.Text          = model.Email;
            this.txtAddress.Text        = model.Address;
            this.txtMobile.Text         = model.Mobile;
            this.txtTel.Text            = model.Telphone;
            this.ddlState.SelectedIndex = this.ddlState.Items.IndexOf(this.ddlState.Items.FindByValue(model.Status));
            this.txtSitCode.Text        = model.SiteCode;

            ////站点信息
            Account_ExtDAL accountdal = new Account_ExtDAL();
            DataSet        accountds  = accountdal.GetAccountds(strID);

            if (accountds != null && accountds.Tables.Count > 0 && accountds.Tables[0].Rows.Count > 0)
            {
                Account_Ext accountmodel = DataConvert.DataRowToModel <Account_Ext>(accountds.Tables[0].Rows[0]);
                if (accountmodel.Photo != null && accountmodel.Photo != "")
                {
                    img0.Src = "../../" + accountmodel.Photo;
                }
                if (accountmodel.CodeImg != null && accountmodel.CodeImg != "")
                {
                    img1.Src = "../../HPPrint/" + accountmodel.CodeImg;
                }
                if (accountmodel.PrintImg1 != null && accountmodel.PrintImg1 != "")
                {
                    img2.Src = "../../HPPrint/" + accountmodel.PrintImg1;
                }
                if (accountmodel.PrintImg2 != null && accountmodel.PrintImg2 != "")
                {
                    img3.Src = "../../HPPrint/" + accountmodel.PrintImg2;
                }
                if (accountmodel.PrintImg3 != null && accountmodel.PrintImg3 != "")
                {
                    img4.Src = "../../HPPrint/" + accountmodel.PrintImg3;
                }
                if (accountmodel.PrintImg4 != null && accountmodel.PrintImg4 != "")
                {
                    img5.Src = "../../HPPrint/" + accountmodel.PrintImg4;
                }
                summary.Text    = accountmodel.Summary;
                hd_remark.Value = accountmodel.Remark;
                ddlsitecategory.SelectedIndex =
                    ddlsitecategory.Items.IndexOf(ddlsitecategory.Items.FindByValue(accountmodel.SiteCategory));
                this.ddlthemeslist.SelectedIndex =
                    this.ddlthemeslist.Items.IndexOf(this.ddlthemeslist.Items.FindByValue(accountmodel.Themes.ToString()));
            }
        }
Exemple #2
0
        public void ShowAccountInfo(string strID)
        {
            DAL.SYS.AccountDAL dal = new DAL.SYS.AccountDAL();
            DataSet            ds  = dal.GetAccountByID(strID);

            Model.SYS.SYS_Account model = DataConvert.DataRowToModel <Model.SYS.SYS_Account>(ds.Tables[0].Rows[0]);
            this.txtID.Value            = model.ID;
            this.txtAccountID.Text      = model.LoginName;
            this.ddlAgent.SelectedIndex = this.ddlAgent.Items.IndexOf(this.ddlAgent.Items.FindByValue(model.AgentID));
            this.txtAccountName.Text    = model.Name;
            this.ddlRole.SelectedIndex  = this.ddlRole.Items.IndexOf(this.ddlRole.Items.FindByValue(model.RoleID));
            this.txtEmail.Text          = model.Email;
            this.txtAddress.Text        = model.Address;
            this.txtMobile.Text         = model.Mobile;
            this.txtTel.Text            = model.Telphone;
            this.ddlState.SelectedIndex = this.ddlState.Items.IndexOf(this.ddlState.Items.FindByValue(model.Status));
            this.txtSitCode.Text        = model.SiteCode;
        }