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); }
partial void DeleteTUser3514(TUser3514 instance);
partial void UpdateTUser3514(TUser3514 instance);
partial void InsertTUser3514(TUser3514 instance);