//public string PersonalNumber { get; set; } //public string StudentMobilePhone { get; set; } //public string MotherFirstAndLastName { get; set; } //public string MotherMobilePhone { get; set; } //public string FatherFirstAndLastName { get; set; } //public string FatherMobilePhone { get; set; } public void SplitMobiles() { //var tmpStudentMobileArray = DictionaryHelper.ParsedMobileNumbers(StudentMobilePhone).Split(',', ';').Where(x => (x.Length == 9 && x.StartsWith("5")) || (x.Length == 12 && x.StartsWith("9955"))).ToArray(); var tmpMotherMobileArray = DictionaryHelper.ParsedMobileNumbers(Parent1Mobile).Split(',', ';').Where(x => (x.Length == 9 && x.StartsWith("5")) || (x.Length == 12 && x.StartsWith("9955"))).ToArray(); var tmpFatherMobileArray = DictionaryHelper.ParsedMobileNumbers(Parent2Mobile).Split(',', ';').Where(x => (x.Length == 9 && x.StartsWith("5")) || (x.Length == 12 && x.StartsWith("9955"))).ToArray(); //StudentMobileArray = new DD_Mobile[tmpStudentMobileArray.Length]; //for (int i = 0; i < tmpStudentMobileArray.Length; i++) // StudentMobileArray[i] = new DD_Mobile { Mobile = tmpStudentMobileArray[i], Name = this.StudentName }; MotherMobileArray = new DD_Mobile[tmpMotherMobileArray.Length]; for (var i = 0; i < tmpMotherMobileArray.Length; i++) { MotherMobileArray[i] = new DD_Mobile { Mobile = tmpMotherMobileArray[i], Name = $"{Parent1FirstName} {Parent1LastName}" } } ; FatherMobileArray = new DD_Mobile[tmpFatherMobileArray.Length]; for (var i = 0; i < tmpFatherMobileArray.Length; i++) { FatherMobileArray[i] = new DD_Mobile { Mobile = tmpFatherMobileArray[i], Name = $"{Parent2FirstName} {Parent2LastName}" } } ; }
public void SplitMobiles() { var tmpStudentMobileArray = DictionaryHelper.ParsedMobileNumbers(StudentMobilePhone).Split(',', ';').Where(x => (x.Length == 9 && x.StartsWith("5")) || (x.Length == 12 && x.StartsWith("9955"))).ToArray(); var tmpMotherMobileArray = DictionaryHelper.ParsedMobileNumbers(MotherMobilePhone).Split(',', ';').Where(x => (x.Length == 9 && x.StartsWith("5")) || (x.Length == 12 && x.StartsWith("9955"))).ToArray(); var tmpFatherMobileArray = DictionaryHelper.ParsedMobileNumbers(FatherMobilePhone).Split(',', ';').Where(x => (x.Length == 9 && x.StartsWith("5")) || (x.Length == 12 && x.StartsWith("9955"))).ToArray(); StudentMobileArray = new DD_Mobile[tmpStudentMobileArray.Length]; for (int i = 0; i < tmpStudentMobileArray.Length; i++) { StudentMobileArray[i] = new DD_Mobile { Mobile = tmpStudentMobileArray[i], Name = Name } } ; MotherMobileArray = new DD_Mobile[tmpMotherMobileArray.Length]; for (int i = 0; i < tmpMotherMobileArray.Length; i++) { MotherMobileArray[i] = new DD_Mobile { Mobile = tmpMotherMobileArray[i], Name = MotherFirstAndLastName } } ; FatherMobileArray = new DD_Mobile[tmpFatherMobileArray.Length]; for (int i = 0; i < tmpFatherMobileArray.Length; i++) { FatherMobileArray[i] = new DD_Mobile { Mobile = tmpFatherMobileArray[i], Name = FatherFirstAndLastName } } ; }