Exemplo n.º 1
0
 //public List<string> OptionalGrades { get; set; }
 //public List<string> OptionalClasses { get; set; }
 public CounslerBranchModelToView(CounslerModel Counsler, BranchModel Branch)
 {
     if (Counsler == null)
          Counsler = new CounslerModel();
      this.Counsler = Counsler;
      if (Branch == null)
          Branch = new BranchModel();
      this.Branch = Branch;
 }
Exemplo n.º 2
0
        internal static List<BranchModel> GetBranchesData()
        {
            List<BranchModel> branches = new List<BranchModel>();
            ApplicationContext.Instnace.contextInstance.branches.ToList().ForEach(b =>
            {
                var priniciple = InMemoryHandler.GetContactById(b.principle_contacts_id);
                var contactA = InMemoryHandler.GetContactById(b.contact_a_contacts_id);
                var contactB = InMemoryHandler.GetContactById(b.contact_b_contacts_id);
                BranchModel tempBranch = new BranchModel()
                {
                    BranchId = b.id,
                    BranchName = b.name,
                    PrincipalName = priniciple.first_name + " " + priniciple.last_name,
                    PrincipalNUmber = priniciple.phone_home
                };

                branches.Add(tempBranch);
            });
            return branches;
        }