private void AddDependentPages(IEnumerable <TemplateBlock> blocks) { foreach (var block in blocks) { var exprBlock = block as MethodStatementExprBlock; if (exprBlock == null || exprBlock.DependentPageName == null) { continue; } var page = Markdown.GetViewPage(exprBlock.DependentPageName); if (page != null) { Dependents.Add(page); } } MarkdownTemplate template; if (this.DirectiveTemplate != null && Markdown.MasterPageTemplates.TryGetValue(this.DirectiveTemplate, out template)) { this.Dependents.Add(template); } if (this.Template != null && Markdown.MasterPageTemplates.TryGetValue(this.Template, out template)) { this.Dependents.Add(template); } }
private void PopulateDependencies(IEnumerable <PropertyInfo> properties) { foreach (var property in properties.Where(p => !PropertiesToIgnore.Contains(p.Name.ToLower()))) { if (property.PropertyType == typeof(EntityReference)) { var attribute = property.GetCustomAttribute(typeof(AttributeLogicalNameAttribute)) as AttributeLogicalNameAttribute; if (attribute == null) { continue; } Dependencies.Add(attribute.LogicalName); continue; } if (!property.PropertyType.IsGenericType || property.PropertyType.GetGenericTypeDefinition() != typeof(IEnumerable <>)) { continue; } var genericTypes = property.PropertyType.GetGenericArguments(); if (genericTypes.Length != 1) { continue; } var genericType = genericTypes[0]; if (!typeof(Entity).IsAssignableFrom(genericType)) { continue; } Dependents.Add(EntityHelper.GetEntityLogicalName(genericType)); } }
/// <summary> /// The object factory for a particular data collection instance. /// </summary> public virtual void CreateObjectsFromData(Dependents dependents, System.Data.DataSet data) { // Do nothing if we have nothing if (data == null || data.Tables.Count == 0 || data.Tables[0].Rows.Count == 0) { return; } // Create a local variable for the new instance. Dependent newobj = null; // Create a local variable for the data row instance. System.Data.DataRow dr = null; // Iterate through the table rows for (int i = 0; i < data.Tables[0].Rows.Count; i++) { // Get a reference to the data row dr = data.Tables[0].Rows[i]; // Create a new object instance newobj = System.Activator.CreateInstance(dependents.ContainsType[0]) as Dependent; // Let the instance set its own members newobj.SetMembers(ref dr); // Add the new object to the collection instance dependents.Add(newobj); } }
public void AddDependent(Dependent dependent) { if (Dependents == null) { Dependents = new List <Dependent>(); } Dependents.Add(dependent); }
/// <summary> /// The object factory for a particular data collection instance. /// </summary> public virtual void CreateObjectsFromData(Dependents dependents, System.Data.SqlClient.SqlDataReader data) { // Do nothing if we have nothing if (data == null) { return; } // Create a local variable for the new instance. Dependent newobj = null; // Iterate through the data reader while (data.Read()) { // Create a new object instance newobj = System.Activator.CreateInstance(dependents.ContainsType[0]) as Dependent; // Let the instance set its own members newobj.SetMembers(ref data); // Add the new object to the collection instance dependents.Add(newobj); } }
protected void Continue(object sender, EventArgs e) { //Get the connection string for the specific database if it isn't already in the view state if (ConnString == String.Empty) { using (GetEmployerConnString gecs = new GetEmployerConnString("AnalogDevices")) //2 = Analog Devices if (!gecs.HasErrors) { ConnString = gecs.ConnectionString; EmployerID = gecs.EmployerID.ToString(); } } if (ConnString != String.Empty) { ThisSession.CnxString = ConnString; } if (EmployerID != String.Empty) { ThisSession.EmployerID = EmployerID; } //Check if the employee exists and if they do, store session info and move on using (GetEmployeeEnrollment gee = new GetEmployeeEnrollment()) { //gee.Firstname = txtFirstName.Text; gee.LastName = Encoder.HtmlEncode(txtLastName.Text); gee.MemberID = Encoder.HtmlEncode(txtMemID.Text); gee.DOB = Encoder.HtmlEncode(txtDOB.Text); gee.GetData(ConnString); if (!gee.HasErrors) { if (gee.EmployeeTable.TableName != "Empty" && gee.EmployeeTable.Rows.Count > 0) { lblNotFound.Visible = false; lblError.Visible = false; ThisSession.CCHID = gee.CCHID; ThisSession.EmployeeID = gee.EmployeeID; ThisSession.SubscriberMedicalID = gee.SubscriberMedicalID; ThisSession.SubscriberRXID = gee.SubscriberRXID; ThisSession.LastName = gee.LastName; //ThisSession.FirstName = gee.Firstname; ThisSession.PatientAddress1 = gee.Address1; ThisSession.PatientAddress2 = gee.Address2; ThisSession.PatientCity = gee.City; ThisSession.PatientState = gee.State; ThisSession.PatientZipCode = gee.ZipCode; ThisSession.PatientLatitude = gee.Latitude; ThisSession.PatientLongitude = gee.Longitude; ThisSession.PatientDateOfBirth = gee.DOB; ThisSession.PatientPhone = gee.Phone; ThisSession.HealthPlanType = gee.HealthPlanType; ThisSession.MedicalPlanType = gee.MedicalPlanType; ThisSession.RxPlanType = gee.RxPlanType; ThisSession.PatientGender = gee.Gender; ThisSession.Parent = gee.Parent; ThisSession.Adult = gee.Adult; ThisSession.PatientEmail = gee.Email; if (gee.Insurer != String.Empty) { ThisSession.Insurer = gee.Insurer; } if (gee.RXProvider != String.Empty) { ThisSession.RXProvider = gee.RXProvider; } if (gee.DependentTable.TableName != "EmptyTable") { Dependents deps = new Dependents(); Dependent dep = null; gee.ForEachDependent(delegate(DataRow dr) { dep = new Dependent(); dep.CCHID = int.Parse(dr["CCHID"].ToString()); dep.FirstName = dr["FirstName"].ToString(); dep.LastName = dr["LastName"].ToString(); dep.DateOfBirth = DateTime.Parse(dr["DateOfBirth"].ToString()); dep.Age = int.Parse(dr["Age"].ToString()); dep.IsAdult = int.Parse(dr["Adult"].ToString()) == 1 ? true : false; dep.ShowAccessQuestions = int.Parse(dr["ShowAccessQuestions"].ToString()) == 1 ? true : false; dep.RelationshipText = dr["RelationshipText"].ToString(); dep.DepToUserGranted = int.Parse(dr["DepToUserGranted"].ToString()) == 1 ? true : false; dep.UserToDepGranted = int.Parse(dr["UserToDepGranted"].ToString()) == 1 ? true : false; dep.Email = dr["Email"].ToString(); deps.Add(dep); }); ThisSession.Dependents = deps; } if (gee.YouCouldHaveSavedTable.TableName != "EmptyTable") { ThisSession.YouCouldHaveSaved = (int)gee.YouCouldHaveSaved; } Response.Redirect("Review.aspx"); } else { lblNotFound.Visible = true; } } else { lblError.Visible = true; } } }
protected void LoadUserEmployerSessionInfo() { //Which employer database? GetKeyEmployeeInfo gkei = new GetKeyEmployeeInfo(HoldUser); if (!gkei.HasErrors) { ThisSession.CCHID = gkei.CCHID; ThisSession.EmployeeID = gkei.EmployeeID; ThisSession.SubscriberMedicalID = gkei.SubscriberMedicalID; ThisSession.SubscriberRXID = gkei.SubscriberRXID; ThisSession.LastName = gkei.LastName; ThisSession.FirstName = gkei.FirstName; ThisSession.PatientAddress1 = gkei.Address1; ThisSession.PatientAddress2 = gkei.Address2; ThisSession.PatientCity = gkei.City; ThisSession.PatientState = gkei.State; ThisSession.PatientZipCode = gkei.ZipCode; ThisSession.PatientLatitude = gkei.Latitude; ThisSession.PatientLongitude = gkei.Longitude; ThisSession.PatientDateOfBirth = gkei.DateOfBirth; ThisSession.PatientPhone = gkei.Phone; ThisSession.HealthPlanType = gkei.HealthPlanType; ThisSession.MedicalPlanType = gkei.MedicalPlanType; ThisSession.RxPlanType = gkei.RxPlanType; ThisSession.PatientGender = gkei.Gender; ThisSession.Parent = gkei.Parent; ThisSession.Adult = gkei.Adult; ThisSession.PatientEmail = HoldUser; if (gkei.Insurer != String.Empty) { ThisSession.Insurer = gkei.Insurer; } if (gkei.RXProvider != String.Empty) { ThisSession.RXProvider = gkei.RXProvider; } if (gkei.DependentTable.TableName != "EmptyTable") { Dependents deps = new Dependents(); Dependent dep = null; gkei.ForEachDependent(delegate(DataRow dr) { dep = new Dependent(); dep.CCHID = int.Parse(dr["CCHID"].ToString()); dep.FirstName = dr["FirstName"].ToString(); dep.LastName = dr["LastName"].ToString(); dep.DateOfBirth = DateTime.Parse(dr["DateOfBirth"].ToString()); dep.Age = int.Parse(dr["Age"].ToString()); dep.IsAdult = int.Parse(dr["Adult"].ToString()) == 1 ? true : false; dep.ShowAccessQuestions = int.Parse(dr["ShowAccessQuestions"].ToString()) == 1 ? true : false; dep.RelationshipText = dr["RelationshipText"].ToString(); dep.DepToUserGranted = int.Parse(dr["DepToUserGranted"].ToString()) == 1 ? true : false; dep.UserToDepGranted = int.Parse(dr["UserToDepGranted"].ToString()) == 1 ? true : false; dep.Email = dr["Email"].ToString(); deps.Add(dep); }); ThisSession.Dependents = deps; } if (gkei.YouCouldHaveSavedTable.TableName != "EmptyTable") { ThisSession.YouCouldHaveSaved = (int)gkei.YouCouldHaveSaved; } } else { //Literal failText = (Literal)CheckEmpIDLogin.FindControl("FailureText"); //failText.Text = gkei.SqlException; //failText.Visible = true; } }
public void AddDependent(DependentEnrollee enrollee) { Dependents.Add(enrollee.Id); }
protected void Continue(object sender, EventArgs e) { if (!Page.IsValid) { return; } //Get the connection string for the specific database if it isn't already in the view state if (ConnString == String.Empty) { using (GetEmployerConnString gecs = new GetEmployerConnString("Starbucks")) if (!gecs.HasErrors) { ConnString = gecs.ConnectionString; EmployerID = gecs.EmployerID.ToString(); } } if (ConnString != String.Empty) { ThisSession.CnxString = ConnString; } if (EmployerID != String.Empty) { ThisSession.EmployerID = EmployerID; } //Check if the employee exists and if they do, store session info and move on using (GetEmployeeEnrollment gee = new GetEmployeeEnrollment()) { //gee.Firstname = txtFirstName.Text; gee.LastName = Encoder.HtmlEncode(txtLastName.Text); gee.SSN = "zzzz"; if (txtPremera1.Text != "XXXXXXX" && txtPremera2.Text != "XX") //From this point validation has already passed so this indicates they are using the member id { gee.MemberID = Encoder.HtmlEncode(txtPremera1.Text) + Encoder.HtmlEncode(txtPremera2.Text); } else { gee.SSN = Encoder.HtmlEncode(txtSSN.Text); } gee.DOB = String.Format("{2}-{1}-{0}", txtMonth.Text, txtDay.Text, txtYear.Text); gee.GetData(ConnString); if (!gee.HasErrors) { if (gee.EmployeeTable.TableName != "Empty" && gee.EmployeeTable.Rows.Count > 0) { lblNotFound.Visible = false; lblError.Visible = false; ThisSession.CCHID = gee.CCHID; ThisSession.EmployeeID = gee.EmployeeID; ThisSession.SubscriberMedicalID = gee.SubscriberMedicalID; ThisSession.SubscriberRXID = gee.SubscriberRXID; ThisSession.LastName = gee.LastName; ThisSession.FirstName = gee.FirstName; ThisSession.PatientAddress1 = gee.Address1; ThisSession.PatientAddress2 = gee.Address2; ThisSession.PatientCity = gee.City; ThisSession.PatientState = gee.State; ThisSession.PatientZipCode = gee.ZipCode; ThisSession.PatientLatitude = gee.Latitude; ThisSession.PatientLongitude = gee.Longitude; ThisSession.PatientDateOfBirth = gee.DOB; ThisSession.PatientPhone = gee.Phone; ThisSession.HealthPlanType = gee.HealthPlanType; ThisSession.MedicalPlanType = gee.MedicalPlanType; ThisSession.RxPlanType = gee.RxPlanType; ThisSession.PatientGender = gee.Gender; ThisSession.Parent = gee.Parent; ThisSession.Adult = gee.Adult; ThisSession.PatientEmail = gee.Email; if (gee.Insurer != String.Empty) { ThisSession.Insurer = gee.Insurer; } if (gee.RXProvider != String.Empty) { ThisSession.RXProvider = gee.RXProvider; } if (gee.DependentTable.TableName != "EmptyTable") { Dependents deps = new Dependents(); Dependent dep = null; gee.ForEachDependent(delegate(DataRow dr) { dep = new Dependent(); dep.CCHID = int.Parse(dr["CCHID"].ToString()); dep.FirstName = dr["FirstName"].ToString(); dep.LastName = dr["LastName"].ToString(); dep.DateOfBirth = DateTime.Parse(dr["DateOfBirth"].ToString()); dep.Age = int.Parse(dr["Age"].ToString()); dep.IsAdult = int.Parse(dr["Adult"].ToString()) == 1 ? true : false; dep.ShowAccessQuestions = int.Parse(dr["ShowAccessQuestions"].ToString()) == 1 ? true : false; dep.RelationshipText = dr["RelationshipText"].ToString(); dep.DepToUserGranted = int.Parse(dr["DepToUserGranted"].ToString()) == 1 ? true : false; dep.UserToDepGranted = int.Parse(dr["UserToDepGranted"].ToString()) == 1 ? true : false; dep.Email = dr["Email"].ToString(); deps.Add(dep); }); ThisSession.Dependents = deps; } if (gee.YouCouldHaveSavedTable.TableName != "EmptyTable") { ThisSession.YouCouldHaveSaved = (int)gee.YouCouldHaveSaved; } Response.Redirect("Review.aspx"); } else { pnlReg.Visible = false; pnlCapture.Visible = true; } //Membership not found } else { lblError.Visible = true; } //General error validating } }
public void AddDependent(Dependent dependent) { Dependents.Add(dependent); }
public void AddDependent(IPerson dependent) { Dependents.Add(dependent); }
protected void Continue(object sender, EventArgs e) { if (!Page.IsValid) return; //Get the connection string for the specific database if it isn't already in the view state if (ConnString == String.Empty) using (GetEmployerConnString gecs = new GetEmployerConnString("Starbucks")) if (!gecs.HasErrors) { ConnString = gecs.ConnectionString; EmployerID = gecs.EmployerID.ToString(); } if (ConnString != String.Empty) ThisSession.CnxString = ConnString; if (EmployerID != String.Empty) ThisSession.EmployerID = EmployerID; //Check if the employee exists and if they do, store session info and move on using (GetEmployeeEnrollment gee = new GetEmployeeEnrollment()) { //gee.Firstname = txtFirstName.Text; gee.LastName = Encoder.HtmlEncode(txtLastName.Text); gee.SSN = "zzzz"; if (txtPremera1.Text != "XXXXXXX" && txtPremera2.Text != "XX") //From this point validation has already passed so this indicates they are using the member id gee.MemberID = Encoder.HtmlEncode(txtPremera1.Text) + Encoder.HtmlEncode(txtPremera2.Text); else gee.SSN = Encoder.HtmlEncode(txtSSN.Text); gee.DOB = String.Format("{2}-{0}-{1}", txtMonth.Text, txtDay.Text, txtYear.Text); gee.GetData(ConnString); if (!gee.HasErrors) { if (gee.EmployeeTable.TableName != "Empty" && gee.EmployeeTable.Rows.Count > 0) { lblNotFound.Visible = false; lblError.Visible = false; ThisSession.CCHID = gee.CCHID; ThisSession.EmployeeID = gee.EmployeeID; ThisSession.SubscriberMedicalID = gee.SubscriberMedicalID; ThisSession.SubscriberRXID = gee.SubscriberRXID; ThisSession.LastName = gee.LastName; ThisSession.FirstName = gee.FirstName; ThisSession.PatientAddress1 = gee.Address1; ThisSession.PatientAddress2 = gee.Address2; ThisSession.PatientCity = gee.City; ThisSession.PatientState = gee.State; ThisSession.PatientZipCode = gee.ZipCode; ThisSession.PatientLatitude = gee.Latitude; ThisSession.PatientLongitude = gee.Longitude; ThisSession.PatientDateOfBirth = gee.DOB; ThisSession.PatientPhone = gee.Phone; ThisSession.HealthPlanType = gee.HealthPlanType; ThisSession.MedicalPlanType = gee.MedicalPlanType; ThisSession.RxPlanType = gee.RxPlanType; ThisSession.PatientGender = gee.Gender; ThisSession.Parent = gee.Parent; ThisSession.Adult = gee.Adult; ThisSession.PatientEmail = gee.Email; if (gee.Insurer != String.Empty) ThisSession.Insurer = gee.Insurer; if (gee.RXProvider != String.Empty) ThisSession.RXProvider = gee.RXProvider; if (gee.DependentTable.TableName != "EmptyTable") { Dependents deps = new Dependents(); Dependent dep = null; gee.ForEachDependent(delegate(DataRow dr) { dep = new Dependent(); dep.CCHID = int.Parse(dr["CCHID"].ToString()); dep.FirstName = dr["FirstName"].ToString(); dep.LastName = dr["LastName"].ToString(); dep.DateOfBirth = DateTime.Parse(dr["DateOfBirth"].ToString()); dep.Age = int.Parse(dr["Age"].ToString()); dep.IsAdult = int.Parse(dr["Adult"].ToString()) == 1 ? true : false; dep.ShowAccessQuestions = int.Parse(dr["ShowAccessQuestions"].ToString()) == 1 ? true : false; dep.RelationshipText = dr["RelationshipText"].ToString(); dep.DepToUserGranted = int.Parse(dr["DepToUserGranted"].ToString()) == 1 ? true : false; dep.UserToDepGranted = int.Parse(dr["UserToDepGranted"].ToString()) == 1 ? true : false; dep.Email = dr["Email"].ToString(); deps.Add(dep); }); ThisSession.Dependents = deps; } if (gee.YouCouldHaveSavedTable.TableName != "EmptyTable") ThisSession.YouCouldHaveSaved = (int)gee.YouCouldHaveSaved; Response.Redirect("Review.aspx"); } else { pnlReg.Visible = false; pnlCapture.Visible = true; } //Membership not found } else { lblError.Visible = true; }//General error validating } }
public HttpResponseMessage GetDependents() { HttpResponseMessage hrm = Request.CreateResponse(HttpStatusCode.NoContent); dynamic data = new ExpandoObject(); EmployeeServices services = new EmployeeServices(); MemberDetail keibc = services.GetKeyEmployeeInfo(Request.EmployerID(), Request.CCHID()); if (keibc != null) { Dependents deps = new Dependents(); Dependent member = new Dependent(); member.CCHID = Request.CCHID(); member.Email = keibc.Email; member.SubscriberMedicalId = keibc.SubscriberMedicalId; member.FullName = string.Format("{0} {1}", keibc.FirstName, keibc.LastName); member.Age = 0; member.IsAdult = true; member.RelationshipText = "Employee"; deps.Add(member); if (keibc.Dependents.Count > 0) { foreach (DependentDetail detail in keibc.Dependents) { Dependent dep = new Dependent(); dep.CCHID = detail.CCHID; dep.Email = detail.Email; dep.SubscriberMedicalId = detail.SubscriberMedicalId; dep.FullName = string.Format("{0} {1}", detail.FirstName, detail.LastName); dep.Age = detail.Age; dep.IsAdult = detail.IsAdult; dep.RelationshipText = detail.RelationshipText; deps.Add(dep); } data.Dependents = deps; hrm = Request.CreateResponse(HttpStatusCode.OK, (object)data); } } //using (GetEmployerConnString gecs = new GetEmployerConnString(Request.EmployerID())) //{ // using (GetKeyEmployeeInfoByCchId gkeibc = new GetKeyEmployeeInfoByCchId()) // { // gkeibc.CchId = Request.CCHID(); // gkeibc.GetData(gecs.ConnString); // if (gkeibc.Tables.Count > 0 && gkeibc.Tables[1].Rows.Count > 0) // { // Dependents deps = new Dependents(); // Dependent dep = null; // if (gkeibc.EmployeeTable.TableName != "Empty" && // gkeibc.EmployeeTable.Rows.Count > 0) // { // dep = new Dependent(); // dep.CCHID = int.Parse(gkeibc["CCHID"].ToString()); // dep.Email = gkeibc["Email"].ToString(); // dep.SubscriberMedicalId = gkeibc["SubscriberMedicalID"].ToString(); // dep.FullName = string.Format("{0} {1}", gkeibc["FirstName"].ToString(), gkeibc["LastName"].ToString()); // dep.Age = 0; // dep.IsAdult = true; // dep.RelationshipText = "Employee"; // deps.Add(dep); // } // if (gkeibc.DependentTable.TableName != "EmptyTable") // { // gkeibc.ForEachDependent(delegate (DataRow dr) // { // dep = new Dependent(); // dep.CCHID = int.Parse(dr["CCHID"].ToString()); // dep.Email = dr["Email"].ToString(); // dep.SubscriberMedicalId = dr["SubscriberMedicalID"].ToString(); // dep.FullName = string.Format("{0} {1}", dr["FirstName"].ToString(), dr["LastName"].ToString()); // dep.Age = int.Parse(dr["Age"].ToString()); // dep.IsAdult = int.Parse(dr["Adult"].ToString()) == 1 ? true : false; // dep.RelationshipText = dr["RelationshipText"].ToString(); // deps.Add(dep); // }); // data.Dependents = deps; // hrm = Request.CreateResponse(HttpStatusCode.OK, (object)data); // } // } // } //} return(hrm); }
public void AddDependent(IPerson dependent, DependentType dependentType) { Dependents.Add(new Dependent(dependentType, dependent.FirstName, dependent.LastName)); }
protected void Continue(object sender, EventArgs e) { //Get the connection string for the specific database if it isn't already in the view state if (ConnString == String.Empty) using (GetEmployerConnString gecs = new GetEmployerConnString("AnalogDevices")) //2 = Analog Devices if (!gecs.HasErrors) { ConnString = gecs.ConnectionString; EmployerID = gecs.EmployerID.ToString(); } if (ConnString != String.Empty) ThisSession.CnxString = ConnString; if (EmployerID != String.Empty) ThisSession.EmployerID = EmployerID; //Check if the employee exists and if they do, store session info and move on using (GetEmployeeEnrollment gee = new GetEmployeeEnrollment()) { //gee.Firstname = txtFirstName.Text; gee.LastName = Encoder.HtmlEncode(txtLastName.Text); gee.MemberID = Encoder.HtmlEncode(txtMemID.Text); gee.DOB = Encoder.HtmlEncode(txtDOB.Text); gee.GetData(ConnString); if (!gee.HasErrors) { if (gee.EmployeeTable.TableName != "Empty" && gee.EmployeeTable.Rows.Count > 0) { lblNotFound.Visible = false; lblError.Visible = false; ThisSession.CCHID = gee.CCHID; ThisSession.EmployeeID = gee.EmployeeID; ThisSession.SubscriberMedicalID = gee.SubscriberMedicalID; ThisSession.SubscriberRXID = gee.SubscriberRXID; ThisSession.LastName = gee.LastName; //ThisSession.FirstName = gee.Firstname; ThisSession.PatientAddress1 = gee.Address1; ThisSession.PatientAddress2 = gee.Address2; ThisSession.PatientCity = gee.City; ThisSession.PatientState = gee.State; ThisSession.PatientZipCode = gee.ZipCode; ThisSession.PatientLatitude = gee.Latitude; ThisSession.PatientLongitude = gee.Longitude; ThisSession.PatientDateOfBirth = gee.DOB; ThisSession.PatientPhone = gee.Phone; ThisSession.HealthPlanType = gee.HealthPlanType; ThisSession.MedicalPlanType = gee.MedicalPlanType; ThisSession.RxPlanType = gee.RxPlanType; ThisSession.PatientGender = gee.Gender; ThisSession.Parent = gee.Parent; ThisSession.Adult = gee.Adult; ThisSession.PatientEmail = gee.Email; if (gee.Insurer != String.Empty) ThisSession.Insurer = gee.Insurer; if (gee.RXProvider != String.Empty) ThisSession.RXProvider = gee.RXProvider; if (gee.DependentTable.TableName != "EmptyTable") { Dependents deps = new Dependents(); Dependent dep = null; gee.ForEachDependent(delegate(DataRow dr) { dep = new Dependent(); dep.CCHID = int.Parse(dr["CCHID"].ToString()); dep.FirstName = dr["FirstName"].ToString(); dep.LastName = dr["LastName"].ToString(); dep.DateOfBirth = DateTime.Parse(dr["DateOfBirth"].ToString()); dep.Age = int.Parse(dr["Age"].ToString()); dep.IsAdult = int.Parse(dr["Adult"].ToString()) == 1 ? true : false; dep.ShowAccessQuestions = int.Parse(dr["ShowAccessQuestions"].ToString()) == 1 ? true : false; dep.RelationshipText = dr["RelationshipText"].ToString(); dep.DepToUserGranted = int.Parse(dr["DepToUserGranted"].ToString()) == 1 ? true : false; dep.UserToDepGranted = int.Parse(dr["UserToDepGranted"].ToString()) == 1 ? true : false; dep.Email = dr["Email"].ToString(); deps.Add(dep); }); ThisSession.Dependents = deps; } if (gee.YouCouldHaveSavedTable.TableName != "EmptyTable") ThisSession.YouCouldHaveSaved = (int)gee.YouCouldHaveSaved; Response.Redirect("Review.aspx"); } else { lblNotFound.Visible = true; } } else { lblError.Visible = true; } } }
protected void LoadUserEmployerSessionInfo() { //Which employer database? GetKeyEmployeeInfo gkei = new GetKeyEmployeeInfo(HoldUser); if (!gkei.HasErrors) { ThisSession.CCHID = gkei.CCHID; ThisSession.EmployeeID = gkei.EmployeeID; ThisSession.SubscriberMedicalID = gkei.SubscriberMedicalID; ThisSession.SubscriberRXID = gkei.SubscriberRXID; ThisSession.LastName = gkei.LastName; ThisSession.FirstName = gkei.FirstName; ThisSession.PatientAddress1 = gkei.Address1; ThisSession.PatientAddress2 = gkei.Address2; ThisSession.PatientCity = gkei.City; ThisSession.PatientState = gkei.State; ThisSession.PatientZipCode = gkei.ZipCode; ThisSession.PatientLatitude = gkei.Latitude; ThisSession.PatientLongitude = gkei.Longitude; ThisSession.PatientDateOfBirth = gkei.DateOfBirth; ThisSession.PatientPhone = gkei.Phone; ThisSession.HealthPlanType = gkei.HealthPlanType; ThisSession.MedicalPlanType = gkei.MedicalPlanType; ThisSession.RxPlanType = gkei.RxPlanType; ThisSession.PatientGender = gkei.Gender; ThisSession.Parent = gkei.Parent; ThisSession.Adult = gkei.Adult; ThisSession.PatientEmail = HoldUser; if (gkei.Insurer != String.Empty) ThisSession.Insurer = gkei.Insurer; if (gkei.RXProvider != String.Empty) ThisSession.RXProvider = gkei.RXProvider; if (gkei.DependentTable.TableName != "EmptyTable") { Dependents deps = new Dependents(); Dependent dep = null; gkei.ForEachDependent(delegate(DataRow dr) { dep = new Dependent(); dep.CCHID = int.Parse(dr["CCHID"].ToString()); dep.FirstName = dr["FirstName"].ToString(); dep.LastName = dr["LastName"].ToString(); dep.DateOfBirth = DateTime.Parse(dr["DateOfBirth"].ToString()); dep.Age = int.Parse(dr["Age"].ToString()); dep.IsAdult = int.Parse(dr["Adult"].ToString()) == 1 ? true : false; dep.ShowAccessQuestions = int.Parse(dr["ShowAccessQuestions"].ToString()) == 1 ? true : false; dep.RelationshipText = dr["RelationshipText"].ToString(); dep.DepToUserGranted = int.Parse(dr["DepToUserGranted"].ToString()) == 1 ? true : false; dep.UserToDepGranted = int.Parse(dr["UserToDepGranted"].ToString()) == 1 ? true : false; dep.Email = dr["Email"].ToString(); deps.Add(dep); }); ThisSession.Dependents = deps; } if (gkei.YouCouldHaveSavedTable.TableName != "EmptyTable") ThisSession.YouCouldHaveSaved = (int)gkei.YouCouldHaveSaved; } else { //Literal failText = (Literal)CheckEmpIDLogin.FindControl("FailureText"); //failText.Text = gkei.SqlException; //failText.Visible = true; } }