public void LoadPage(int id, string returnUrl) { // select a record by primary key(s) CourseEnquiryAPI.BusinessObject.WorkflowStepsMaster objWorkflowStepsMaster = WorkflowStepsMaster.SelectByPrimaryKey(id); // assign values to the model WorkflowStepsMaster objWorkflowStepsMasterTemp = new WorkflowStepsMaster(); objWorkflowStepsMasterTemp.StepId = objWorkflowStepsMaster.StepId; objWorkflowStepsMasterTemp.WorKflowId = objWorkflowStepsMaster.WorKflowId; objWorkflowStepsMasterTemp.ApprovalLevel = objWorkflowStepsMaster.ApprovalLevel; objWorkflowStepsMasterTemp.Description = objWorkflowStepsMaster.Description; objWorkflowStepsMasterTemp.AutoApprove = objWorkflowStepsMaster.AutoApprove; objWorkflowStepsMasterTemp.WaitTime = objWorkflowStepsMaster.WaitTime; if (objWorkflowStepsMaster.WaitTime.HasValue) { objWorkflowStepsMasterTemp.WaitTimeHidden = objWorkflowStepsMaster.WaitTime.Value.ToString(); } else { objWorkflowStepsMasterTemp.WaitTimeHidden = null; } objWorkflowStepsMasterTemp.CreatedBy = objWorkflowStepsMaster.CreatedBy; objWorkflowStepsMasterTemp.CreatedOn = objWorkflowStepsMaster.CreatedOn; objWorkflowStepsMasterTemp.UpdatedBy = objWorkflowStepsMaster.UpdatedBy; objWorkflowStepsMasterTemp.UpdatedOn = objWorkflowStepsMaster.UpdatedOn; // assign values to this page's bound property WorkflowStepsMaster = objWorkflowStepsMasterTemp; // assign the return url ReturnUrl = returnUrl; }
public PageResult LoadPage(int id, string returnUrl) { // select a record by primary key(s) CourseEnquiryAPI.BusinessObject.WorkflowStepsMaster objWorkflowStepsMaster = WorkflowStepsMaster.SelectByPrimaryKey(id); // assign values to the model WorkflowStepsMaster objWorkflowStepsMasterTemp = new WorkflowStepsMaster(); objWorkflowStepsMasterTemp.StepId = objWorkflowStepsMaster.StepId; objWorkflowStepsMasterTemp.WorKflowId = objWorkflowStepsMaster.WorKflowId; objWorkflowStepsMasterTemp.ApprovalLevel = objWorkflowStepsMaster.ApprovalLevel; objWorkflowStepsMasterTemp.Description = objWorkflowStepsMaster.Description; objWorkflowStepsMasterTemp.AutoApprove = objWorkflowStepsMaster.AutoApprove; objWorkflowStepsMasterTemp.WaitTime = objWorkflowStepsMaster.WaitTime; if (objWorkflowStepsMaster.WaitTime.HasValue) { objWorkflowStepsMasterTemp.WaitTimeHidden = objWorkflowStepsMaster.WaitTime.Value.ToString(); } else { objWorkflowStepsMasterTemp.WaitTimeHidden = null; } objWorkflowStepsMasterTemp.CreatedBy = objWorkflowStepsMaster.CreatedBy; objWorkflowStepsMasterTemp.CreatedOn = objWorkflowStepsMaster.CreatedOn; objWorkflowStepsMasterTemp.UpdatedBy = objWorkflowStepsMaster.UpdatedBy; objWorkflowStepsMasterTemp.UpdatedOn = objWorkflowStepsMaster.UpdatedOn; // create the model used by the partial page AddEditWorkflowStepsMasterPartialModel model = new AddEditWorkflowStepsMasterPartialModel(); model.WorkflowMasterDropDownListData = WorkflowMaster.SelectWorkflowMasterDropDownListData(); model.Operation = CrudOperation.Update; model.ReturnUrl = returnUrl; model.WorkflowStepsMaster = objWorkflowStepsMasterTemp; // 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() { WorkflowStepsMaster = new CourseEnquiryAPI.BusinessObject.WorkflowStepsMaster(); WorkflowMasterDropDownListData = WorkflowMaster.SelectWorkflowMasterDropDownListData(); }