示例#1
0
        public int AddUser(ref CUser aUser)
        {
            //    CUser tmpUser = new CUser();
            //    tmpUser.theUniqueID = 0;
            //tmpUser.theDate = DateTime.Now;

            string tmpID    = aUser.theID;
            int    tmpCount = theUserContext.TUser3102.Where(x => x.theID == tmpID).Count();

            if (tmpCount > 0)
            {
                return(0);
            }

            TUser3102 tmpUser = new TUser3102();

            tmpUser.theID        = aUser.theID;
            tmpUser.thePW        = aUser.thePW;
            tmpUser.theName      = aUser.theName;
            tmpUser.theEMail     = aUser.theEMail;
            tmpUser.bSubcription = aUser.bSubscription ? 1 : 0;
            tmpUser.theDate      = DateTime.Now;

            theUserContext.TUser3102.InsertOnSubmit(tmpUser);
            theUserContext.SubmitChanges();

            aUser.theDate = DateTime.Now;
            return(1);
        }
示例#2
0
 partial void UpdateTUser3102(TUser3102 instance);
示例#3
0
 partial void DeleteTUser3102(TUser3102 instance);
示例#4
0
 partial void InsertTUser3102(TUser3102 instance);