private void setInfo() { using (BLLContact bll = new BLLContact()) { Contact obj = new Contact(); if (this.rbtnIsChinese.Checked == true) { obj = bll.GetSingle(1); } else if (this.rbtnIsEnglish.Checked == true) { obj = bll.GetSingle(2); } txtConCompany.Text = obj.ConCompany; txtConAddress.Text = obj.ConAddress; txtConPhone.Text = obj.ConPhone; txtConTel.Text = obj.ConTel; txtConFax.Text = obj.ConFax; txtConEmail.Text = obj.ConEmail; txtConWebsite.Text = obj.ConWebsite; txtConName.Text = obj.ConName; txtHotPhone.Text = obj.HotPhone; txtBaiDuCount.Text = obj.BaiDuCount; txtRemarks.Text = obj.Remarks; phoneTxtTel.Text = obj.PhoneTel; phoneTxtSms.Text = obj.PhoneSms; } }
private void setContactsInfo() { using (BLLContact bll = new BLLContact()) { Contact contact = bll.GetSingle(1); if (contact != null) { tel = contact.ConPhone; sms = contact.ConTel; phone = contact.ConTel; } } }
protected void btnSubmit_Click(object sender, EventArgs e) { using (BLLContact bll = new BLLContact()) { Contact obj = new Contact(); if (this.rbtnIsChinese.Checked == true) { obj = bll.GetSingle(1); } else if (this.rbtnIsEnglish.Checked == true) { obj = bll.GetSingle(2); } obj.ConCompany = txtConCompany.Text.ToString(); obj.ConAddress = txtConAddress.Text.ToString(); obj.ConPhone = txtConPhone.Text.ToString(); obj.ConTel = txtConTel.Text.ToString(); obj.ConFax = txtConFax.Text.ToString(); obj.ConEmail = txtConEmail.Text.ToString(); obj.ConWebsite = txtConWebsite.Text.ToString(); obj.ConName = txtConName.Text.ToString(); obj.HotPhone = txtHotPhone.Text.ToString(); obj.BaiDuCount = txtBaiDuCount.Text.ToString(); obj.Remarks = txtRemarks.Text.ToString(); obj.PhoneTel = phoneTxtTel.Text.ToString(); obj.PhoneSms = phoneTxtSms.Text.ToString(); bll.Save(obj); if (bll.IsFail) { ExceptionManager.ShowErrorMsg(this, bll.DevNetException); } else { JSMsg.ShowMsg(this, "保存成功"); } } }
private void setContactsInfo() { using (BLLContact bll = new BLLContact()) { Contact contact = bll.GetSingle(1); if (contact != null) { lblAddress.Text = contact.ConAddress; lblTel.Text = contact.ConTel; lblName.Text = contact.ConName; lblPhone.Text = contact.ConPhone; lblEmail.Text = contact.ConEmail; lblFax.Text = contact.ConFax; //numbertongji = contact.BaiDuCount.ToString(); } } }
private void setInfo() { using (BLLContact bll = new BLLContact()) { Contact contact = bll.GetSingle(1); if (contact != null) { //lblAddress.Text = contact.ConAddress; //lblTel.Text = contact.ConTel; //Lblcomname.Text = contact.ConCompany; //Lblcomname1.Text = contact.ConCompany; //lblPhone.Text = contact.ConPhone; //lblEmail.Text = contact.ConEmail; //lblFax.Text = contact.ConFax; //lblWeb.Text = contact.ConWebsite; //numbertongji = contact.BaiDuCount.ToString(); } } }
private void setContactsInfo() { using (BLLContact bll = new BLLContact()) { Contact contact = bll.GetSingle(1); if (contact != null) { address = contact.ConAddress; tel = contact.ConTel; ////lblTel1.Text = contact.ConTel; name = contact.ConCompany; //Lblcomname1.Text = contact.ConCompany; phone = contact.ConPhone; //lblEmail.Text = contact.ConEmail; fax = contact.ConFax; people = contact.ConName; website = contact.ConWebsite; //numbertongji = contact.BaiDuCount.ToString(); } } }