예제 #1
0
 protected void btnStaffs_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtName.Text.Length > 0)
         {
             string mobile = Session["s_MobileNo"].ToString();
             uc.AddStaff(mobile, txtName.Text, txtMobileNo.Text, txtAdhaarNo.Text, txtPanNo.Text, txtFullAddress.Text, txtDateOfJoining.Text, txtpass.Text);
             string textmsg = "" + txtName.Text + " Added Successfully !";
             ScriptManager.RegisterStartupScript(this, typeof(Page), "Warning", "<script>showpopsuccess('" + textmsg + "')</script>", false);
             txtName.Text          = string.Empty;
             txtMobileNo.Text      = string.Empty;
             txtAdhaarNo.Text      = string.Empty;
             txtPanNo.Text         = string.Empty;
             txtFullAddress.Text   = string.Empty;
             txtDateOfJoining.Text = string.Empty;
             btnStaffs.Visible     = true;
             btnSaveChenge.Visible = false;
             sendotp();
         }
         else
         {
             string text = "Please Enter Name ";
             ScriptManager.RegisterStartupScript(this, typeof(Page), "Warning", "<script>showpoperror('" + text + "')</script>", false);
         }
     }
     catch (Exception ex)
     {
         string text = ex.Message.ToString();
         ScriptManager.RegisterStartupScript(this, typeof(Page), "Warning", "<script>showpoperror('" + text + "')</script>", false);
     }
 }