protected void btnGetPassword_Click(object sender, EventArgs e) { try { int intCount = objOdbc.executeScalar_int("SELECT COUNT(1) FROM mlm_login WHERE my_sponsar_id ='" + txtUserID.Text + "'"); if (intCount == 1) { int intCount1 = objOdbc.executeScalar_int("SELECT COUNT(1) FROM mlm_login a INNER JOIN mlm_personal_details b ON a.userid=b.userid WHERE a.my_sponsar_id ='" + txtUserID.Text + "' AND b.mobile_number='" + txtMobile.Text + "' "); if (intCount1 == 1) { DataSet ds = new DataSet(); ds = objOdbc.getDataSet("SELECT a.password, a.trans_pwd,b.username, b.email,b.mobile_number FROM mlm_login a, mlm_personal_details b WHERE a.userid=b.userid AND a.my_sponsar_id ='" + txtUserID.Text + "'"); if ((ds.Tables[0].Rows.Count > 0)) { string strUserID = txtUserID.Text; string strPassword = ds.Tables[0].Rows[0][0].ToString(); string strTransPassword = ds.Tables[0].Rows[0][1].ToString(); string strUserName = ds.Tables[0].Rows[0][2].ToString(); string strEmailID = ds.Tables[0].Rows[0][3].ToString(); string strMessage = "Hello " + strUserName + ", Password: "******" Trans. Password: "******", LifeGold.com"; string strNumber = ds.Tables[0].Rows[0][4].ToString(); objComm.SMS_API_for_Single_SMS(strMessage, strNumber); send_mail(); CommonMessages.ShowAlertMessage_Reload("Credentials are sent on your registerd mobile no. and email", "Login.aspx"); } } else { CommonMessages.ShowAlertMessage("Entered UserID does not match with entered mobile no. Please kindly enter registered mobile no.!"); } } else { CommonMessages.ShowAlertMessage("entered UserID does not exist!"); } } catch (Exception ex) { CommonMessages.ShowAlertMessage(ex.Message); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Session["WelcomeID"] = 2; if (Session["WelcomeID"] != null) { DataSet ds = new DataSet(); try { ds = objOdbc.getDataSet("Select b.username, a.my_sponsar_id, a.password, a.trans_pwd, b.email, b.mobile_number From mlm_login a, mlm_personal_details b WHERE a.userid=b.userid AND a.userid =" + Session["WelcomeID"]); if ((ds.Tables[0].Rows.Count > 0)) { txtUserName.Text = "User Name : " + ds.Tables[0].Rows[0][0].ToString(); txtUserID.Text = "User ID : " + ds.Tables[0].Rows[0][1].ToString(); txtPassword.Text = "Password : "******"Transaction Password : "******"Welcome to LifeGold ! Your " + txtUserID.Text + ", " + txtPassword.Text + ", " + txtTransPwd.Text + ". www.LifeGold.com"; objcomm.SMS_API_for_Single_SMS(strmessage, strMobileNumber); send_mail(); } } catch (Exception ex) { } finally { ds.Dispose(); } } } }