Example #1
0
        public int AddUser(ref CUser aUser)
        {
            /*           CUser tmpUser=new CUser();
             *         tmpUser.theUniqueID=0;
             *         tmpUser.theID=aUser.theID;
             *         tmpUser.thePW = aUser.thePW;
             *         tmpUser.theName = aUser.theName;
             *         tmpUser.theEMail = aUser.theEMail;
             *         tmpUser.theDate = DateTime.Now;
             *         theUsers.Add(tmpUser);
             */
            string tmpID    = aUser.theID;
            int    tmpCount = theUserContext.TUser3513.Where(x => x.theID == tmpID).Count();

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

            TUser3513 tmpUser = new TUser3513();

            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.TUser3513.InsertOnSubmit(tmpUser); //데이터 추가
            theUserContext.SubmitChanges();                   //동적으로 쿼리 생성

            aUser.theDate = DateTime.Now;
            return(1);
        }
Example #2
0
 partial void DeleteTUser3513(TUser3513 instance);
Example #3
0
 partial void UpdateTUser3513(TUser3513 instance);
Example #4
0
 partial void InsertTUser3513(TUser3513 instance);