/// <summary> /// Handles the Click event of the btnHome control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// <remarks></remarks> private void btnHome_Click(object sender, EventArgs e) { this.Close(); Member_Account ObjMC = new Member_Account(localEmpId, localEmpName, locationtype); ObjMC.Show(); }
/// <summary> /// redirecting to member account form /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// <remarks></remarks> private void btnBack_Click(object sender, EventArgs e) { this.Close(); Member_Account ma = new Member_Account(localEmpID, localEmpName, locationtype); ma.Show(); }
/// <summary> /// Handles the Click event of the btnHome control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// <remarks></remarks> private void btnHome_Click(object sender, EventArgs e) { this.Close(); Member_Account ma = new Member_Account(localEmpId, localEmpName, locationType); //redirecting to Member account form ma.Show(); }
/// <summary> /// Handles the Click event of the btn_Home control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// <remarks></remarks> private void btn_Home_Click(object sender, EventArgs e) { this.Close(); Member_Account ObjMC = new Member_Account(LocalEmpId, localEmpName, locationType); ObjMC.Show();//redirecting to Member account from with ID and Name }
/// <summary> /// Handles the Click event of the btnBack control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// <remarks></remarks> private void btnBack_Click(object sender, EventArgs e) { this.Close(); Member_Account ObjMA = new Member_Account(LocalEmpId, localEmpName, locationType); ObjMA.Show(); }
/// <summary> /// Handles the Click event of the btnLogin control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// <remarks></remarks> private void btnLogin_Click(object sender, EventArgs e) { try { if (txtUserid.Text.Trim() == string.Empty) { errorProvider1.SetError(txtUserid, "Enter UserId"); txtUserid.Focus(); } else { errorProvider1.Clear(); } if (txtPassword.Text.Trim() == string.Empty) { errorProvider1.SetError(txtPassword, "Enter Password"); } else { errorProvider1.Clear(); } if (txtUserid.Text.Trim() != "" && txtPassword.Text.Trim() != "") { //dslogin = GC.ExcelConnectivity("Select * from [User$] where [Emp No] ='" + txtUserid.Text.Trim() + "' and Password='******' ", "OleDbConnString_UserLoginVisakhapatnam"); dslogin = GC.ExcelConnectivity("Select * from [Sheet1$] where [Emp No] ='" + txtUserid.Text.Trim() + "' and Password='******' ", "OleDbConnString_UserLogin_" + "" + locationType + ""); // checking the credentials of auser if (dslogin.Tables[0].Rows.Count > 0) { this.Close(); Member_Account objMA = new Member_Account(dslogin.Tables[0].Rows[0]["Emp No"].ToString(), dslogin.Tables[0].Rows[0]["Employee Name"].ToString(), locationType); // redirecting to Member Account objMA.Show(); } else { lblerror.Text = "The UserId or Password you entered is incorrect."; txtUserid.Text = ""; txtPassword.Text = ""; txtUserid.Focus(); } } } catch (Exception ex) { GC.ErrorLoging(ex.ToString()); lblRelogin.Text = "Please Relogin"; txtUserid.Text = ""; txtPassword.Text = ""; txtUserid.Focus(); } }