示例#1
0
        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);
            }
        }
示例#2
0
        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);
            }
        }