예제 #1
0
        private void PopulateControls()
        {
            // Populate dropdown controls.
            Sprocs.GetDeviceOwners().ForEach(owner => OwnerDropDown.Items.Add(owner));

            Sprocs.GetUsers(CurrentSession.AccountId).ForEach(user =>
                                                              UserDropDown.Items.Add(new ListItem(user.UserName, user.Id.ToString())));

            DeviceIdTextBox.Text = Guid.NewGuid().ToString();
        }
예제 #2
0
        private void PopulateControls()
        {
            // Add context menu items to master.
            var linkList = new List <KeyValuePair <string, string> >();
            var master   = Master as SiteMaster;

            foreach (var user in Sprocs.GetUsers(CurrentSession.AccountId))
            {
                /* TODO: pretty URLs.
                 * linkList.Add(new KeyValuePair<string, string>(
                 *  user.UserName,  String.Format(
                 *  "/scheduling/view/{0}/{1}", CurrentSession.AccountId, user.Id)));
                 */
                linkList.Add(new KeyValuePair <string, string>(
                                 user.UserName, String.Format(
                                     "/scheduling/view?aid={0}&uid={1}", CurrentSession.AccountId, user.Id)));
            }

            master.UpdateContextMenu(linkList);
        }