コード例 #1
0
        public ActionResult Index()
        {
            Roommates roommatesModel = new Roommates();
            InitializeRoommates(roommatesModel);

            ChoreRequestModel chorerequest = new ChoreRequestModel();
            chorerequest.roommates = roommatesModel;

            return View(chorerequest);
        }
コード例 #2
0
        public void InitializeRoommates(Roommates roommates)
        {
            for (int i = 0; i < 5; i++)
            {
                /*
                roommates.roomMates[i].Email = CloudConfigurationManager.GetSetting("EmailAddr_" + i);
                roommates.roomMates[i].Name = CloudConfigurationManager.GetSetting("Name_" + i);
                */

                Roommate roommate = new Roommate();
                roommate.Email = "*****@*****.**";
                roommate.Name = "Jack";

                roommates.roomMates[i] = roommate;
            }
        }