protected void btnSubmit_Click(object sender, EventArgs e) { string engFName = tbFName.Text.Trim(); string engLName = tbLName.Text.Trim(); string phone = tbPhone.Text.Trim(); string email = tbEmail.Text.Trim(); string counselingType = tbCounselingType.Text.Trim(); // if (ddlCounselingType.SelectedValue == "Other") // counselingType = ; string counselingDesc = taCounselingDesc.InnerText; int id = 0; id = FrontEmail.AddNewEmailCounseling("", engFName, engLName, "", "", "", "", "", "", "", "", "", phone, "", email, "", counselingType, counselingDesc); if (id > 0) { lblMessage.Text = "성공적으로 입력되었습니다."; // CounselingTable.Visible = false; //send email to customer, lawyer and admin SendEmail(); } else { lblMessage.Text = "에러가 발생하였습니다. 잠시 후 다시 시도해 주십시오"; } }
protected void btnSubmit_Click(object sender, EventArgs e) { if (ValidateInsertFields()) { string korName = tbKorName.Text.Trim(); string engFName = tbFName.Text.Trim(); string engLName = tbLName.Text.Trim(); string birthday = tbYear.Text.Trim() + "-" + tbMonth.Text.Trim() + "-" + tbDay.Text.Trim(); string korZip = tbKorZip1.Text.Trim() + "-" + tbKorZip2.Text.Trim(); string korAddress = tbKorAddress.Text.Trim(); string korAddress2 = tbKorAddress2.Text.Trim(); string address = tbEngAddress.Text.Trim(); string address2 = tbEngAddress2.Text.Trim(); string city = tbCity.Text.Trim(); string state = tbState.Text.Trim(); string zip = tbZip.Text.Trim(); string phone1 = tbPhone11.Text.Trim() + "-" + tbPhone12.Text.Trim() + "-" + tbPhone13.Text.Trim(); string phone2 = ""; if (string.IsNullOrEmpty(tbPhone21.Text) == false) { phone2 = tbPhone21.Text.Trim() + "-" + tbPhone22.Text.Trim() + "-" + tbPhone23.Text.Trim(); } string email = tbEmail1.Text.Trim() + "@" + tbEmail2.Text.Trim(); string sitePath = ddlSitePath.SelectedValue; if (ddlSitePath.SelectedValue == "Other") { sitePath = tbSitePath.Text.Trim(); } string counselingType = ddlCounselingType.SelectedValue; if (ddlCounselingType.SelectedValue == "Other") { counselingType = tbCounselingType.Text.Trim(); } string counselingDesc = taCounselingDesc.InnerText; int id = 0; id = FrontEmail.AddNewEmailCounseling(korName, engFName, engLName, birthday, korZip, korAddress, korAddress2, address, address2, city, state, zip, phone1, phone2, email, sitePath, counselingType, counselingDesc); if (id > 0) { lblMessage.Text = "성공적으로 입력되었습니다."; CounselingTable.Visible = false; //send email to customer, lawyer and admin SendEmail(); } else { lblMessage.Text = "에러가 발생하였습니다. 잠시 후 다시 시도해 주십시오"; } } }