Пример #1
0
        public int AddUser(ref CUser aUser)
        {
            /* CUser tmpUser = new CUser();
             * tmpUser.theUniuqeID = 0;
             * tmpUser.theDate = DateTime.Now; */

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

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

            TUser3209 tmpUser = new TUser3209();

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

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

            aUser.theDate = tmpUser.theDate;

            return(1);
        }
Пример #2
0
 partial void UpdateTUser3209(TUser3209 instance);
Пример #3
0
 partial void DeleteTUser3209(TUser3209 instance);
Пример #4
0
 partial void InsertTUser3209(TUser3209 instance);