protected void btnSubmit_Click(object sender, EventArgs e) { try { objMem = new Class_Members(); objMem.FirstName = txtFirstName.Text; objMem.MiddleName = txtMName.Text; objMem.Lastname = txtLName.Text; objMem.MailId = txtMailId.Text; objMem.Address = txtAddress.Text; objMem.ContactNo = txtContactNo.Text; objMem.PhotoContent = (byte[])Session["Photo"]; objMem.PhotoFileName = Convert.ToString(Session["FileName"]); objMem.UserName = txtUserName.Text; objMem.Pwd = txtPassword.Text; int i = objMem.InsertMemberDetails(); mainPanel.Enabled = false; System.Threading.Thread.Sleep(3000); mainPanel.Enabled = true; if (i >= 1) { ClearData(); lblMsg.Text = "Member Information Registered.."; } else lblMsg.Text = "Registration not completed. Try again !!!"; } catch (Exception ex) { mainPanel.Enabled = false; System.Threading.Thread.Sleep(3000); mainPanel.Enabled = true; lblMsg.Text = ex.Message; } }
protected void btnSubmit_Click(object sender, EventArgs e) { try { objMem = new Class_Members(); objMem.FirstName = txtFirstName.Text; objMem.MiddleName = txtMName.Text; objMem.Lastname = txtLName.Text; objMem.MailId = txtMailId.Text; objMem.Address = txtAddress.Text; objMem.ContactNo = txtContactNo.Text; objMem.PhotoContent = (byte[])Session["Photo"]; objMem.PhotoFileName = Convert.ToString(Session["FileName"]); objMem.UserName = txtUserName.Text; objMem.Pwd = txtPassword.Text; int i = objMem.InsertMemberDetails(); mainPanel.Enabled = false; System.Threading.Thread.Sleep(3000); mainPanel.Enabled = true; if (i >= 1) { ClearData(); lblMsg.Text = "Member Information Registered.."; } else { lblMsg.Text = "Registration not completed. Try again !!!"; } } catch (Exception ex) { mainPanel.Enabled = false; System.Threading.Thread.Sleep(3000); mainPanel.Enabled = true; lblMsg.Text = ex.Message; } }