public bool changeAdminPass(DTO.DTO_Admin user) { try { SqlCommand command = getCommand("adminChangePass"); command.CommandType = System.Data.CommandType.StoredProcedure; command.Parameters.Add("userID", System.Data.SqlDbType.VarChar).Value = user.UserID; command.Parameters.Add("newPassword", System.Data.SqlDbType.VarChar).Value = user.UserPass; return(command.ExecuteNonQuery() >= 0); } catch { return(false); } }
public DataTable login(DTO.DTO_Admin user) { DataTable datatable = new DataTable(); try { SqlCommand command = getCommand("adminLogin"); command.CommandType = System.Data.CommandType.StoredProcedure; SqlDataAdapter sda = new SqlDataAdapter(command); sda.Fill(datatable); return(datatable); } catch { return(null); } }