public frm_student_information_entry(int StudentID) { InitializeComponent(); saving = SavingOptions.UPDATE; LoadProvinces(); StudentInfo student = StudentInfo.GetStudent(StudentID); _student = student; txtLRN.Text = student.LRN; txtFirstname.Text = student.Firstname; txtMiddlename.Text = student.Middlename; txtLastname.Text = student.Lastname; txtExtensionName.Text = student.ExtensionName; txtBirthDate.Value = student.BirthDate; txtBirthPlace.Text = student.BirthPlace; cmbGender.Text = student.Gender; txtStreet.Text = student.Street; cmbProvince.Text = student.Province; cmbCity.Text = student.City; cmbBarangay.Text = student.Barangay; txtMobileNo.Text = student.MobileNo; txtEmailAddress.Text = student.EmailAddress; }
public frm_student_information_entry_guardian(int StudentID) { InitializeComponent(); _StudentID = StudentID; _guardian = StudentInfo.GetStudentGuardian(_StudentID); if (_guardian.StudentGuardianID == 0) { saving = SavingOptions.INSERT; } else { saving = SavingOptions.UPDATE; } txtMotherName.Text = _guardian.MotherName; txtMotherMobile.Text = _guardian.MotherMobile; txtFatherName.Text = _guardian.FatherName; txtFatherMobile.Text = _guardian.FatherMobile; txtGuardianName.Text = _guardian.GuardianName; txtGuardianMobile.Text = _guardian.GuardianMobile; txtGuardianRelation.Text = _guardian.GuardianRelation; if (txtGuardianMobile.Text == txtMotherMobile.Text) { rbMotherGuardian.Checked = true; } else if (txtGuardianMobile.Text == txtFatherMobile.Text) { rbFatherGuardian.Checked = true; } else { rbOtherGuardian.Checked = true; } }
/// <summary> /// The save. /// </summary> /// <param name="typeResolver"> /// The resolved type reference. /// </param> /// <param name="writer"> /// The writer. /// </param> /// <param name="savingOptions"> /// The saving Options. /// </param> private void Save(TypeResolver typeResolver, IndentedTextWriter writer, SavingOptions savingOptions) { writer.Write( savingOptions.HasFlag(SavingOptions.UseFullyQualifiedNames) || !typeResolver.IsNamespaceInUsingDerictives ? typeResolver.GetCxFullyQualifiedType(savingOptions) : typeResolver.GetCxType(savingOptions)); }
/// <summary> /// The save. /// </summary> /// <param name="typeReferenceText"> /// The type reference text. /// </param> /// <param name="writer"> /// The writer. /// </param> /// <param name="savingOptions"> /// The saving Options. /// </param> private void Save(string typeReferenceText, IndentedTextWriter writer, SavingOptions savingOptions) { this.Save(new TypeResolver(typeReferenceText, this), writer, savingOptions); }
/// <summary> /// The save. /// </summary> /// <param name="parameter"> /// The parameter. /// </param> /// <param name="writer"> /// The writer. /// </param> /// <param name="savingOptions"> /// The saving Options. /// </param> private void Save(Parameter parameter, IndentedTextWriter writer, SavingOptions savingOptions) { this.Save(parameter.Modifiers, writer); if (parameter.Type != null) { this.Save(parameter.Type, writer, savingOptions); this.SaveModifiersAfter(parameter.Modifiers, writer); writer.Write(' '); } writer.Write(parameter.Name); if (parameter.Type != null) { this.SaveSuffix(parameter.Type, null, writer, false); } }
/// <summary> /// The save. /// </summary> /// <param name="parameters"> /// The parameters. /// </param> /// <param name="writer"> /// The writer. /// </param> /// <param name="savingOptions"> /// The saving Options. /// </param> private void Save(IList<Parameter> parameters, IndentedTextWriter writer, SavingOptions savingOptions) { writer.Write('('); var first = true; foreach (var parameter in parameters) { if (!first) { writer.Write(", "); } this.Save(parameter, writer, savingOptions); first = false; } writer.Write(')'); }
/// <summary> /// The save. /// </summary> /// <param name="parameters"> /// The parameters. /// </param> /// <param name="writer"> /// The writer. /// </param> /// <param name="savingOptions"> /// The saving Options. /// </param> private void Save(IParameterContainer parameters, IndentedTextWriter writer, SavingOptions savingOptions) { this.Save(parameters.Parameters, writer, savingOptions); }
private string BuildType(SavingOptions savingOptions, string name) { var buildType = name; if ((this.NamespaceNode != null && !savingOptions.HasFlag(SavingOptions.RemovePointer) && this.isReference) || this.isPointer) { buildType = string.Concat(buildType, "^"); } if (savingOptions.HasFlag(SavingOptions.ApplyReference)) { buildType = string.Concat(buildType, "&"); } if (savingOptions.HasFlag(SavingOptions.ApplyRvalueReference)) { buildType = string.Concat(buildType, "&&"); } return buildType; }
public string GetCxType(SavingOptions savingOptions) { return this.BuildType(savingOptions, this.GetCxName(savingOptions)); }
public string GetCxName(SavingOptions savingOptions) { if (this.isAuto) { return "auto"; } if (!this.IsReference) { return this.type; } if (!this.isTemplate) { return ConvertNamespaceChars(this.type); } var sb = new StringBuilder(100); // you need to convert all template types into correct types sb.Append(this.GetCxTypeNameWithoutTemplateParameters()); sb.Append('<'); var first = true; foreach (var templateType in CXXConverterLogic.GetGenericsTypes(this.type)) { var referencedType = new TypeResolver(templateType, this.namesResolver); if (!first) { sb.Append(", "); } first = false; sb.Append( savingOptions.HasFlag(SavingOptions.UseFullyQualifiedNames) ? referencedType.GetCxFullyQualifiedType(SavingOptions.None) : referencedType.GetCxType(SavingOptions.None)); } sb.Append('>'); return sb.ToString(); }
public string GetCxFullyQualifiedType(SavingOptions savingOptions) { return this.BuildType(savingOptions, this.GetCXFullyQualifiedName(savingOptions)); }
public string GetCXFullyQualifiedName(SavingOptions savingOptions) { var name = this.GetCxName(savingOptions); if (!string.IsNullOrEmpty(this.Namespace)) { var lastNamespaceChars = name.Split('<')[0].LastIndexOf("::"); if (lastNamespaceChars != -1) { name = name.Substring(lastNamespaceChars + 2); } return string.Concat(this.Namespace.Replace(".", "::"), "::", name); } return name; }
public frm_student_information_entry() { InitializeComponent(); saving = SavingOptions.INSERT; LoadProvinces(); }