public bool adminLoginCheck(adminLoginBO adminLoginBO) { try { if (con.State == ConnectionState.Closed) { con.Open(); } query = "adminLoginCheck"; cmd = new SqlCommand(query, con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@adminId", adminLoginBO.adminId); cmd.Parameters.AddWithValue("@password", adminLoginBO.password); SqlParameter result = cmd.Parameters.Add("@res", SqlDbType.Bit); result.Direction = ParameterDirection.Output; cmd.ExecuteNonQuery(); return(bool.Parse(result.Value.ToString())); } catch { throw; } finally { if (con.State == ConnectionState.Open) { con.Close(); } } }
public bool AdminLoginCheck(adminLoginBO AdminLoginBO) { try { query = "SELECT * FROM adminLogin WHERE username=@username AND password=@password"; cmd = new SqlCommand(query, con); if (con.State == ConnectionState.Closed) { con.Open(); } cmd.Parameters.AddWithValue("@username", AdminLoginBO.username); cmd.Parameters.AddWithValue("@password", AdminLoginBO.password); drd = cmd.ExecuteReader(); if (drd.HasRows) { drd.Read(); return true; } else { return false; } } catch { throw; } finally { con.Close(); } }
public bool adminLoginCheck(adminLoginBO adminLoginBO) { try { if(con.State==ConnectionState.Closed) { con.Open(); } query = "adminLoginCheck"; cmd = new SqlCommand(query, con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@adminId", adminLoginBO.adminId); cmd.Parameters.AddWithValue("@password", adminLoginBO.password); SqlParameter result = cmd.Parameters.Add("@res", SqlDbType.Bit); result.Direction = ParameterDirection.Output; cmd.ExecuteNonQuery(); return (bool.Parse(result.Value.ToString())); } catch { throw; } finally { if(con.State==ConnectionState.Open) { con.Close(); } } }
public bool adminLoginCheck(adminLoginBO adminLoginBO) { try { return(adminLoginDAL.adminLoginCheck(adminLoginBO)); } catch { throw; } finally { } }
public bool adminLoginCheck(adminLoginBO adminLoginBO) { try { return (adminLoginDAL.adminLoginCheck(adminLoginBO)); } catch { throw; } finally { } }
public void ChangePassword(adminLoginBO AdminLoginBO) { try { AdminLoginDAL.ChangePassword(AdminLoginBO); } catch { throw; } finally { } }
public bool AdminLoginCheck(adminLoginBO AdminLoginBO) { try { return AdminLoginDAL.AdminLoginCheck(AdminLoginBO); } catch { throw; } finally { } }
public void ChangePassword(adminLoginBO AdminLoginBO) { try { query = "UPDATE adminLogin SET password=@password WHERE username=@username"; cmd = new SqlCommand(query, con); if (con.State == ConnectionState.Closed) { con.Open(); } cmd.Parameters.AddWithValue("@username", AdminLoginBO.username); cmd.Parameters.AddWithValue("@password", AdminLoginBO.password); cmd.ExecuteNonQuery(); } catch { throw; } finally { con.Close(); } }