private void CreateClient() { using (ClientDataContext db = new ClientDataContext(Config.LIFENAVConnectionString)) { var client = new LIFENAV_Client(); client.FirstName = txtFirstName.Text; client.LastName = txtLastName.Text; client.Address1 = txtAddress1.Text; client.Address2 = txtAddress2.Text; client.City = txtCity.Text; client.StateCode = ddlState.SelectedValue; client.ZipCode = txtZipCode.Text; client.Email = txtEmail.Text; client.Password = txtPassword.Text; client.HomePhone = txtHomePhone.Text; client.WorkPhone = txtWorkPhone.Text; db.LIFENAV_Clients.InsertOnSubmit(client); db.SubmitChanges(); // update cookie with Client.Id clientId = client.Id; MyCookie.ClientId = clientId.ToString(); MyCookie.EmailAddress = txtEmail.Text; } }
partial void DeleteLIFENAV_Client(LIFENAV_Client instance);
partial void UpdateLIFENAV_Client(LIFENAV_Client instance);
partial void InsertLIFENAV_Client(LIFENAV_Client instance);