protected void txt_signup_Click(object sender, EventArgs e) { dt = objaccess.GetCustomerBymobile(txtMobile.Text); if (dt.Rows.Count == 0) { dt = objaccess.GetCustomer(Convert.ToInt32(Session["CustomerID"])); string ipaddress = GetIPAddress(); objaccess.AddEditCustomerRegistration(0, txt_username.Text, txt_email.Text, txt_password.Text, ipaddress, txtMobile.Text, hidden_memberid.Value, txt_referralid.Text); dt = objaccess.GetLoginforbulk(txtMobile.Text, txt_password.Text); if (dt.Rows.Count > 0) { Session["CustomerID"] = Convert.ToString(dt.Rows[0]["CustomerID"]); objwallet.AddEditWalletAmount(0, "0", "0", "0", Session["CustomerID"].ToString()); DataTable dtmemberdetails = objacc.GetDatatable("Select * from tblcustomer where customerID=" + dt.Rows[0]["CustomerID"].ToString()); if (dtmemberdetails.Rows.Count > 0) { string Message = "Registration Successfully with us. Your CUSTOMER ID IS : " + dtmemberdetails.Rows[0]["MemberID"].ToString() + " Share on Whatsapp and Facebook and Get 200 Points For Shopping Daily"; // SendSMS(dtmemberdetails.Rows[0]["Mobile_No"].ToString(), Message, dtmemberdetails.Rows[0]["MemberID"].ToString()); } } ScriptManager.RegisterStartupScript(this, this.GetType(), "keykey", "alert(' Your Account Create Successfully !!!');location.replace('UserHome.aspx');", true); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "keykey", "alert('You are Already Registered With mobile !!!');", true); } }
protected void txt_signup_Click(object sender, EventArgs e) { #region signup dt = objaccess.GetCustomerBymobile(txtMobile.Text); if (dt.Rows.Count == 0) { string Referral = txt_referralid.Text == "" ? "WINSMART" : txt_referralid.Text; if (txt_referralid.Text != "") { Referral = txt_referralid.Text; } else { Referral = "WINSMART"; } dt = objaccess.GetCustomer(Convert.ToInt32(Session["CustomerID"])); string ipaddress = GetIPAddress(); objaccess.AddEditCustomerRegistration(0, txt_username.Text, txt_email.Text, txt_password.Text, ipaddress, txtMobile.Text, hidden_memberid.Value, Referral); fillcart(); dt = objaccess.GetLoginforbulk(txtMobile.Text, txt_password.Text); if (dt.Rows.Count > 0) { Session["CustomerID"] = Convert.ToString(dt.Rows[0]["CustomerID"]); objwallet.AddEditWalletAmount(0, "0", "0", "0", Session["CustomerID"].ToString()); fillcart(); DataTable dtmemberdetails = objacc.GetDatatable("Select * from tblcustomer where customerID=" + dt.Rows[0]["CustomerID"].ToString()); if (dtmemberdetails.Rows.Count > 0) { string Message = "Registration Successfully with us. Your CUSTOMER ID IS : " + dtmemberdetails.Rows[0]["MemberID"].ToString() + " Share on Whatsapp and Facebook and Get 200 Points For Shopping Daily"; SendSMS(dtmemberdetails.Rows[0]["Mobile_No"].ToString(), Message, dtmemberdetails.Rows[0]["MemberID"].ToString()); } } //Page.ClientScript.RegisterStartupScript(Page.GetType(), "validation", "<script language='javascript'>alert(' Your Account Create Successfully !');window.location('UserLogin.aspx');</script>"); ScriptManager.RegisterStartupScript(this, this.GetType(), "keykey", "alert(' Your Account Create Successfully !!!');location.replace('ViewCart.aspx');", true); } else { ScriptManager.RegisterStartupScript(this, this.GetType(), "keykey", "alert('You are Already Registered With mobile !!!');", true); } //} //else //{ // ScriptManager.RegisterStartupScript(this, this.GetType(), "keykey", "alert('Invalid Sponsor ID !!!');", true); //} #endregion }