Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Maticsoft.BLL.ComPany combll = new Maticsoft.BLL.ComPany();
         int maxid = combll.GetMaxId() - 1;
         Maticsoft.Model.ComPany commodel = combll.GetModel(maxid);
         lblComPanyContent.Text = commodel.comconten;
     }
 }
Esempio n. 2
0
        private void bind()
        {
            Maticsoft.BLL.ComPany companybll = new Maticsoft.BLL.ComPany();
            int maxid = companybll.GetMaxId() - 1;

            Maticsoft.Model.ComPany companymodel = companybll.GetModel(maxid);
            lblComEmail.Text     = companymodel.ComEmail;
            lblComFax.Text       = companymodel.ComFax;
            lblCompanyNames.Text = companymodel.CompanyNames;
            lblComPhoto.Text     = companymodel.ComPhoto;
            lblFanren.Text       = companymodel.Fanren;
        }
Esempio n. 3
0
 private void ShowInfo(int CompanyID)
 {
     Maticsoft.BLL.ComPany   bll   = new Maticsoft.BLL.ComPany();
     Maticsoft.Model.ComPany model = bll.GetModel(CompanyID);
     this.lblCompanyID.Text    = model.CompanyID.ToString();
     this.txtCompanyNames.Text = model.CompanyNames;
     this.txtCompanyType.Text  = model.CompanyType;
     this.txtComAddress.Text   = model.ComAddress;
     this.txtComFax.Text       = model.ComFax;
     this.txtComPhoto.Text     = model.ComPhoto;
     this.txtComEmail.Text     = model.ComEmail;
     this.txtQQ.Text           = model.QQ;
     this.txtComwangzhi.Text   = model.Comwangzhi;
 }
Esempio n. 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Maticsoft.BLL.ComPany   companybll   = new Maticsoft.BLL.ComPany();
         Maticsoft.Model.ComPany companymodel = companybll.GetModel(1);
         lblComAddress.Text   = companymodel.ComAddress;
         lblComEmail.Text     = companymodel.ComEmail;
         lblComFax.Text       = companymodel.ComFax;
         lblCompanyNames.Text = companymodel.CompanyNames;
         lblComPhoto.Text     = companymodel.ComPhoto;
         lblComwangzhi.Text   = companymodel.Comwangzhi;
         lblqq.Text           = companymodel.QQ;
     }
 }
Esempio n. 5
0
        private void bind()
        {
            Maticsoft.BLL.ComPany   combll   = new Maticsoft.BLL.ComPany();
            Maticsoft.Model.ComPany commodel = combll.GetModel(1);

            txtcomfaren.Text    = commodel.Fanren.ToString();
            txtcomfax.Text      = commodel.ComFax;
            txtcompanyname.Text = commodel.CompanyNames;
            txtcompanytype.Text = commodel.CompanyType;
            txtcomphoto.Text    = commodel.ComPhoto;
            txtcomwangzhi.Text  = commodel.Comwangzhi;
            txtcontent.Text     = commodel.comconten;
            txtEmail.Text       = commodel.ComEmail;
            txtqq.Text          = commodel.QQ;
            txtcomaddress.Text  = commodel.ComAddress;
        }
Esempio n. 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["usename"] != null)
                {
                    if (Session["usename"].ToString() != "")
                    {
                        Maticsoft.BLL.ComPany   companybll   = new Maticsoft.BLL.ComPany();
                        Maticsoft.Model.ComPany companymodel = companybll.GetModel(1);

                        if (companymodel.CompanyNames == "")
                        {
                            btnadd.Visible    = true;
                            btnupadel.Visible = false;
                        }
                        else
                        {
                            btnadd.Visible    = false;
                            btnupadel.Visible = true;
                            bind();
                        }
                    }
                    else
                    {
                        Response.Redirect("login.aspx");
                        Response.End();
                    }
                }
                else
                {
                    Response.Redirect("login.aspx");
                    Response.End();
                }
            }
        }
Esempio n. 7
0
        protected void btnupadel_Click(object sender, EventArgs e)
        {
            //Maticsoft.BLL.ComPany companybll = new Maticsoft.BLL.ComPany();
            //Maticsoft.Model.ComPany commodel = new Maticsoft.Model.ComPany();
            Maticsoft.BLL.ComPany companybll = new Maticsoft.BLL.ComPany();

            Maticsoft.Model.ComPany commodel = companybll.GetModel(1);
            if (txtcompanyname.Text.Trim() == "")
            {
                lblconname.Text = "请填写公司名称";
                return;
            }
            lblconname.Text       = "";
            commodel.CompanyNames = txtcompanyname.Text.Trim();
            if (txtcompanytype.Text.Trim() == "")
            {
                lbltype.Text = "请填写公司类型";
                return;
            }
            lbltype.Text         = "";
            commodel.CompanyType = txtcompanytype.Text.Trim();
            if (txtcomaddress.Text.Trim() == "")
            {
                lbladdress.Text = "请填写公司地址";
                return;
            }
            lbladdress.Text     = "";
            commodel.ComAddress = txtcomaddress.Text.Trim();
            if (txtcomfax.Text.Trim() == "")
            {
                lblfax.Text = "请填写公司传真";
                return;
            }
            lblfax.Text     = "";
            commodel.ComFax = txtcomfax.Text.Trim();
            if (txtcomfaren.Text.Trim() == "")
            {
                lblfanren.Text = "请填写公司法人代表";
                return;
            }
            lblfanren.Text  = "";
            commodel.Fanren = txtcomfaren.Text.Trim();
            if (txtcomphoto.Text.Trim() == "")
            {
                lblphoto.Text = "请填写公司电话";
                return;
            }
            lblphoto.Text     = "";
            commodel.ComPhoto = txtcomphoto.Text.Trim();
            if (txtEmail.Text.Trim() == "")
            {
                lblemail.Text = "请填写公司邮箱";
                return;
            }
            lblemail.Text     = "";
            commodel.ComEmail = txtEmail.Text.Trim();
            if (txtqq.Text.Trim() == "")
            {
                lblqq.Text = "请填写公司qq或MSN";
                return;
            }
            lblqq.Text  = "";
            commodel.QQ = txtqq.Text.Trim();
            if (txtcomwangzhi.Text.Trim() == "")
            {
                lblwangzhi.Text = "请填写公司网址";
                return;
            }
            lblwangzhi.Text     = "";
            commodel.Comwangzhi = txtcomwangzhi.Text.Trim();
            if (txtcontent.Text.Trim() == "")
            {
                lblcomcontent.Text = "请填写公司简介";
            }
            lblcomcontent.Text = "";
            commodel.comconten = txtcontent.Text.Trim();
            companybll.Update(commodel);
            Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('信息添加成功....')</script>");
            bind();
        }