예제 #1
0
        public int AddUser(ref CUser aUser)
        {
            /*
             * CUser tmpUser = new CUser();
             * tmpUser.theUniqueID = 0;
             *
             * theUsers.Add(aUser);
             */

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

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


            TUser3514 tmpUser = new TUser3514();

            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.TUser3514.InsertOnSubmit(tmpUser);
            theUserContext.SubmitChanges();

            aUser.theDate = DateTime.Now;
            return(1);
        }
예제 #2
0
 partial void DeleteTUser3514(TUser3514 instance);
예제 #3
0
 partial void UpdateTUser3514(TUser3514 instance);
예제 #4
0
 partial void InsertTUser3514(TUser3514 instance);