public List <Customer> GetDataList()
        {
            List <Customer> dataItemList = new List <Customer>();

            command = new SqlCommand("Select * from Customer");
            reader  = databaseLogicLayer.GetDataList(command);
            while (reader.Read())
            {
                Customer item = new Customer();
                item.Id              = reader.IsDBNull(0) ? 0 : reader.GetInt32(0);
                item.FirstName       = reader.IsDBNull(1) ? string.Empty : reader.GetString(1);
                item.LastName        = reader.IsDBNull(2) ? string.Empty : reader.GetString(2);
                item.TelephoneNumber = reader.IsDBNull(3) ? string.Empty : reader.GetString(3);
                item.EmailAddress    = reader.IsDBNull(4) ? string.Empty : reader.GetString(4);
                item.CreateDate      = reader.IsDBNull(5) ? DateTime.MinValue : reader.GetDateTime(5);
                dataItemList.Add(item);
            }
            reader.Close();
            databaseLogicLayer.ConnectionOpenClose();

            return(dataItemList);
        }
        public SystemUser CheckSystemUser(SystemUser systemUser)
        {
            SystemUser dataItem = new SystemUser();

            command = new SqlCommand("select * from SystemUser where UserName = @UserName and Pass = @Pass");
            command.Parameters.Add("@UserName", System.Data.SqlDbType.NVarChar).Value = systemUser.UserName;
            command.Parameters.Add("@Pass", System.Data.SqlDbType.NVarChar).Value     = systemUser.Pass;
            reader = databaseLogicLayer.GetDataList(command);
            while (reader.Read())
            {
                dataItem.Id       = reader.IsDBNull(0) ? 0 : reader.GetInt32(0);
                dataItem.UserName = reader.IsDBNull(1) ? string.Empty : reader.GetString(1);
                dataItem.Pass     = reader.IsDBNull(2) ? string.Empty : reader.GetString(2);
            }
            reader.Close();
            databaseLogicLayer.ConnectionOpenClose();
            return(dataItem);
        }