コード例 #1
0
        public void LoadPage(int id, string returnUrl)
        {
            // select a record by primary key(s)
            CourseEnquiryAPI.BusinessObject.Course objCourse = Course.SelectByPrimaryKey(id);

            // assign values to this page's bound property
            Course = objCourse;

            // assign the return url
            ReturnUrl = returnUrl;
        }
コード例 #2
0
        public PageResult LoadPage(int id, string returnUrl)
        {
            // select a record by primary key(s)
            CourseEnquiryAPI.BusinessObject.Course objCourse = Course.SelectByPrimaryKey(id);

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

            model.Operation = CrudOperation.Update;
            model.ReturnUrl = returnUrl;
            model.Course    = objCourse;

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

            // assign the return url
            ReturnUrl = returnUrl;

            return(Page());
        }
コード例 #3
0
 /// <summary>
 /// Sets data needed on page intialization.
 /// </summary>
 private void SetData()
 {
     Course = new CourseEnquiryAPI.BusinessObject.Course();
 }