Пример #1
0
        public void TestMethod1()
        {
            AccountDal account = new AccountDal();

            account.Insert(new Account {
                UserID = Guid.NewGuid(), Username = "******", Password = "******"
            });
            PersonDal person = new PersonDal();

            person.Insert(new Person {
                PID = Guid.NewGuid(), Pname = "york", Pgrade = "BoardMember", Padvs = "", Pact4fire = "", Pact4water = "", Pcontact = "", Pemail = "", Pfield_of_firm = "", Phobbies = "", Pjob4u = "", Ppro = "", Psex = "男", Ptel = "135", Ptime = 1234567, PwechatID = "", Pwork_years = 1, Username = "******"
            });
        }
Пример #2
0
        public bool insertMem(Account account, Person person, XiaoYan xiaoyan)
        {
            bool res = true;

            try
            {
                _account.Insert(account);
                _persondal.Insert(person);
                _memdal.Insert(xiaoyan);
            }
            catch (Exception e)
            {
                res = false;
                using (StreamWriter writer =
                           new StreamWriter(@"C:\Users\lenovo\Desktop\log.txt", true))
                {
                    writer.WriteLine(DateTime.Now.ToString());
                    writer.WriteLine(e.Message);
                    writer.WriteLine(e.StackTrace);
                }
            }
            return(res);
        }
Пример #3
0
 /// <summary>
 /// 添加新用户
 /// </summary>
 /// <param name="entity"></param>
 /// <returns></returns>
 public int Insert(CustomerEntity entity)
 {
     return(Dal.Insert(entity));
 }