Example #1
0
 protected void ImgbtnSubmit_Click(object sender, ImageClickEventArgs e)
 {
     if (Page.IsValid)
     {
         ContactInfo info = new ContactInfo();
         info.c_name      = txtName.Text;
         info.c_subject   = txtSubject.Text;
         info.c_detail    = txtDetail.Text;
         info.c_mail      = txtEmail.Text;
         info.c_phone1    = txtPhone.Text;
         info.c_phone2    = txtFax.Text;
         info.c_pose_date = DateTime.Now;
         info.l_id        = 2;//英文
         if (cBLL.Insert(info) > 0)
         {
             AddMethodSystem.ShowBox(UpdatePanel1, this.GetType(), "insertContact", "alert('Thanks for your message! We will contact you soon...');document.location.href='index.aspx'");
         }
     }
 }
Example #2
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     if (Page.IsValid)
     {
         ContactInfo info = new ContactInfo();
         info.c_name      = txtName.Text;
         info.c_subject   = txtTitle.Text;
         info.c_sex       = rbSex.SelectedValue;
         info.c_phone1    = txtTel.Text;
         info.c_mail      = txtMail.Text;
         info.c_address   = address1.Area + address1.City + address1.CodeId + address1.Address;
         info.c_detail    = txtContent.Text;
         info.c_pose_date = DateTime.Now;
         info.c_ip        = Tools.GetIpAddress();
         info.l_id        = lid;
         if (cBLL.Insert(info) > 0)
         {
             //SMTP
             //SMTPSet();
             Response.Redirect("List.aspx?id=0&header=" + Getmessage("30009"));
         }
     }
 }
Example #3
0
 public ApiResultDto AddContact([FromBody] crm_contact contact)
 {
     return(Result(_bll.Insert(contact, GetToken())));
 }