public void LoadPage(int id, string returnUrl) { // select a record by primary key(s) TemporaryDBappllicationAPI.BusinessObject.WorkflowMaster objWorkflowMaster = WorkflowMaster.SelectByPrimaryKey(id); // assign values to the model WorkflowMaster objWorkflowMasterTemp = new WorkflowMaster(); objWorkflowMasterTemp.WorkflowId = objWorkflowMaster.WorkflowId; objWorkflowMasterTemp.WorkflowName = objWorkflowMaster.WorkflowName; objWorkflowMasterTemp.LevelOfApprovals = objWorkflowMaster.LevelOfApprovals; if (objWorkflowMaster.LevelOfApprovals.HasValue) { objWorkflowMasterTemp.LevelOfApprovalsHidden = objWorkflowMaster.LevelOfApprovals.Value.ToString(); } else { objWorkflowMasterTemp.LevelOfApprovalsHidden = null; } objWorkflowMasterTemp.CreatedBy = objWorkflowMaster.CreatedBy; objWorkflowMasterTemp.CreatedOn = objWorkflowMaster.CreatedOn; objWorkflowMasterTemp.Updatedby = objWorkflowMaster.Updatedby; objWorkflowMasterTemp.Updatedon = objWorkflowMaster.Updatedon; // assign values to this page's bound property WorkflowMaster = objWorkflowMasterTemp; // assign the return url ReturnUrl = returnUrl; }
public PageResult LoadPage(int id, string returnUrl) { // select a record by primary key(s) TemporaryDBappllicationAPI.BusinessObject.WorkflowMaster objWorkflowMaster = WorkflowMaster.SelectByPrimaryKey(id); // assign values to the model WorkflowMaster objWorkflowMasterTemp = new WorkflowMaster(); objWorkflowMasterTemp.WorkflowId = objWorkflowMaster.WorkflowId; objWorkflowMasterTemp.WorkflowName = objWorkflowMaster.WorkflowName; objWorkflowMasterTemp.LevelOfApprovals = objWorkflowMaster.LevelOfApprovals; if (objWorkflowMaster.LevelOfApprovals.HasValue) { objWorkflowMasterTemp.LevelOfApprovalsHidden = objWorkflowMaster.LevelOfApprovals.Value.ToString(); } else { objWorkflowMasterTemp.LevelOfApprovalsHidden = null; } objWorkflowMasterTemp.CreatedBy = objWorkflowMaster.CreatedBy; objWorkflowMasterTemp.CreatedOn = objWorkflowMaster.CreatedOn; objWorkflowMasterTemp.Updatedby = objWorkflowMaster.Updatedby; objWorkflowMasterTemp.Updatedon = objWorkflowMaster.Updatedon; // create the model used by the partial page AddEditWorkflowMasterPartialModel model = new AddEditWorkflowMasterPartialModel(); model.Operation = CrudOperation.Update; model.ReturnUrl = returnUrl; model.WorkflowMaster = objWorkflowMasterTemp; // 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() { WorkflowMaster = new TemporaryDBappllicationAPI.BusinessObject.WorkflowMaster(); }