Exemple #1
0
        public void LoadPage(int id, string returnUrl)
        {
            // select a record by primary key(s)
            CourseEnquiry1API.BusinessObject.Student objStudent = Student.SelectByPrimaryKey(id);

            // assign values to this page's bound property
            Student = objStudent;

            // assign the return url
            ReturnUrl = returnUrl;
        }
        public PageResult LoadPage(int id, string returnUrl)
        {
            // select a record by primary key(s)
            CourseEnquiry1API.BusinessObject.Student objStudent = Student.SelectByPrimaryKey(id);

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

            model.Operation = CrudOperation.Update;
            model.ReturnUrl = returnUrl;
            model.Student   = objStudent;

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

            // assign the return url
            ReturnUrl = returnUrl;

            return(Page());
        }
Exemple #3
0
 /// <summary>
 /// Sets data needed on page intialization.
 /// </summary>
 private void SetData()
 {
     Student = new CourseEnquiry1API.BusinessObject.Student();
 }