Beispiel #1
0
        public void LoadPage(int id, string returnUrl)
        {
            // select a record by primary key(s)
            fifth_tempDBAPI.BusinessObject.UserRoles objUserRoles = UserRoles.SelectByPrimaryKey(id);

            // assign values to this page's bound property
            UserRoles = objUserRoles;

            // assign the return url
            ReturnUrl = returnUrl;
        }
Beispiel #2
0
        public PageResult LoadPage(int id, string returnUrl)
        {
            // select a record by primary key(s)
            fifth_tempDBAPI.BusinessObject.UserRoles objUserRoles = UserRoles.SelectByPrimaryKey(id);

            // create the model used by the partial page
            AddEditUserRolesPartialModel model = new AddEditUserRolesPartialModel();

            model.UserMasterDropDownListData = UserMaster.SelectUserMasterDropDownListData();
            model.RoleMasterDropDownListData = RoleMaster.SelectRoleMasterDropDownListData();
            model.Operation = CrudOperation.Update;
            model.ReturnUrl = returnUrl;
            model.UserRoles = objUserRoles;

            // assign values to the model used by this page
            PartialModel = model;

            // assign the return url
            ReturnUrl = returnUrl;

            return(Page());
        }
 /// <summary>
 /// Sets data needed on page intialization.
 /// </summary>
 private void SetData()
 {
     UserRoles = new fifth_tempDBAPI.BusinessObject.UserRoles();
     UserMasterDropDownListData = UserMaster.SelectUserMasterDropDownListData();
     RoleMasterDropDownListData = RoleMaster.SelectRoleMasterDropDownListData();
 }