예제 #1
0
        public void LoadPage(int id, string returnUrl)
        {
            // select a record by primary key(s)
            StudentEnquiryAPI.BusinessObject.Enquiry objEnquiry = Enquiry.SelectByPrimaryKey(id);

            // assign values to this page's bound property
            Enquiry = objEnquiry;

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

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

            model.EnquiryDropDownListData = Enquiry.SelectEnquiryDropDownListData();
            model.CouseDropDownListData   = Couse.SelectCouseDropDownListData();
            model.Operation = CrudOperation.Update;
            model.ReturnUrl = returnUrl;
            model.Enquiry   = objEnquiry;

            // 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()
 {
     Enquiry = new StudentEnquiryAPI.BusinessObject.Enquiry();
     EnquiryDropDownListData = Enquiry.SelectEnquiryDropDownListData();
     CouseDropDownListData   = Couse.SelectCouseDropDownListData();
 }