Beispiel #1
0
 protected void btnPartners_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtName.Text.Length > 0)
         {
             string mobile = Session["s_MobileNo"].ToString();
             uc.AddPartner(mobile, txtName.Text, txtMobileNo.Text, txtDateOfJoining.Text, txtDetails.Text);
             string textmsg = "" + txtName.Text + " Now Partner with Stayello Successfully added !";
             ScriptManager.RegisterStartupScript(this, typeof(Page), "Warning", "<script>showpopsuccess('" + textmsg + "')</script>", false);
             txtName.Text          = string.Empty;
             txtMobileNo.Text      = string.Empty;
             txtDateOfJoining.Text = string.Empty;
             txtDetails.Text       = string.Empty;
         }
         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);
     }
 }