Beispiel #1
0
    private void bindModel(int id)
    {
        model = bll.GetModel(id);
        txtIndustryName.Text = model.industryName;
        txtLinkMan.Text      = model.LinkMan;
        txtPhone.Text        = model.phone;
        string tel = model.tel;

        txtAddress.Text = model.address.Trim();
        txtCompany.Text = model.company.Trim();
        txtFax.Text     = model.fax.Trim();
        txtEmail.Text   = model.email.Trim();
        txtQQ.Text      = model.QQ;
        txtMeo.Text     = model.meo;
        txtSite.Text    = model.site;
        if (!string.IsNullOrEmpty(tel))
        {
            string[] telLen = tel.Split(new char[] { ',' });
            if (telLen.Length == 1)
            {
                txtTel.Text = model.tel;
            }
            else
            {
                txtcontactsTel.Text = telLen[0].ToString();
                txtTel.Text         = telLen[1].ToString();
                txttel2.Text        = telLen[2].ToString();
            }
        }
    }
Beispiel #2
0
    public string GetLaiyuan(int formid)
    {
        if (formid > 0)
        {
            IndustryFromBLL bll = new IndustryFromBLL();
            if (bll.GetModel(formid) != null)
            {
                return(bll.GetModel(formid).industryName);
            }
            else
            {
                return("数据己被删除");
            }
        }
        else
        {
            return("暂无机构");
        }

        //string par = "";
        //if (formid == 1)
        //{
        //    par = "总站";
        //}
        //else { par = "拓富中心"; }
        //return par;
    }