Add() public static method

public static Add ( CmsData.CMSDataContext db, CmsData.Family fam, string firstname, string nickname, string lastname, System.DateTime dob ) : Person
db CmsData.CMSDataContext
fam CmsData.Family
firstname string
nickname string
lastname string
dob System.DateTime
return Person
Exemplo n.º 1
0
 public int AddPerson(string firstname, string nickname, string lastname, string email, int marital = 0, int gender = 0, int?familymemberid = null)
 {
     using (var db2 = NewDataContext())
     {
         var p = Person.Add(db2, null, firstname, nickname, lastname, null);
         p.GenderId        = gender;
         p.MaritalStatusId = marital;
         p.EmailAddress    = email;
         db2.SubmitChanges();
         return(p.PeopleId);
     }
 }