コード例 #1
0
        public void GetOwnerIdTest()
        {
            long id    = OwnerInformation.GetOwnerId(_databasePath, out var ownerName, out var ownerLic, out _errOut);
            bool value = id > 0;

            if (value)
            {
                TestContext.WriteLine($"id: {id}");
                TestContext.WriteLine($"owner name: {ownerName}");
                TestContext.WriteLine($"License: {ownerLic}");
            }
            General.HasTrueValue(value, _errOut);
        }
コード例 #2
0
        public void EditOwnerInformationTest()
        {
            long             id    = OwnerInformation.GetOwnerId(_databasePath, out var ownerName, out var ownerLic, out _errOut);
            List <OwnerInfo> lst   = OwnerInformation.GetOwnerInfo(_databasePath, out _errOut);
            bool             value = false;

            if (lst.Count > 0)
            {
                string username     = "";
                string password     = "";
                string forgotword   = "";
                string forgotphrase = "";
                string name         = "";
                string license      = "";
                string address      = "";
                string city         = "";
                string zipCode      = "";
                string state        = "";
                string phone        = "";
                foreach (OwnerInfo l in lst)
                {
                    username     = l.UserName;
                    password     = l.Password;
                    forgotword   = l.ForgotWord;
                    forgotphrase = l.ForgotPhrase;
                    name         = l.Name;
                    license      = l.Ccdwl;
                    address      = l.Address;
                    city         = l.City;
                    zipCode      = l.ZipCode;
                    state        = l.State;
                    phone        = l.Phone;
                }

                value = OwnerInformation.Update(_databasePath, id, $"UPDATED: {name}", address, city, state, zipCode,
                                                phone, license, true, password, username, forgotword, forgotphrase, out _errOut);
            }
            General.HasTrueValue(value, _errOut);
        }