コード例 #1
0
    /// <summary>
    /// The example below shows how to Select the WorkflowId and WorkflowName columns for use with a with a Drop Down List, Combo Box, Checked Box List, List View, List Box, etc
    /// </summary>
    private void SelectWorkflowMasterDropDownListData()
    {
        List <WorkflowMaster> objWorkflowMasterCol = WorkflowMaster.SelectWorkflowMasterDropDownListData();

        // Example 1:  directly bind to a drop down list - for ASP.NET Web Forms
        // DropDownList ddl1 = new DropDownList();
        // ddl1.DataValueField = "WorkflowId";
        // ddl1.DataTextField = "WorkflowName";
        // ddl1.DataSource = objWorkflowMasterCol;
        // ddl1.DataBind();

        // Example 2:  add each item through a loop - for ASP.NET Web Forms
        // DropDownList ddl2 = new DropDownList();

        // foreach (WorkflowMaster objWorkflowMaster in objWorkflowMasterCol)
        // {
        //     ddl2.Items.Add(new ListItem(objWorkflowMaster.WorkflowName, objWorkflowMaster.WorkflowId.ToString()));
        // }

        // Example 3:  bind to a combo box.  for Windows Forms (WinForms)
        // ComboBox cbx1 = new ComboBox();

        // foreach (WorkflowMaster objWorkflowMaster in objWorkflowMasterCol)
        // {
        //     cbx1.Items.Add(new ListItem(objWorkflowMaster.WorkflowName, objWorkflowMaster.WorkflowId.ToString()));
        // }
    }
コード例 #2
0
         private PageResult LoadPage(string returnUrl)
         {
             // create the model used by the partial page
             AddEditWorkflowStepsMasterPartialModel model = new AddEditWorkflowStepsMasterPartialModel();
             model.WorkflowMasterDropDownListData = WorkflowMaster.SelectWorkflowMasterDropDownListData();
             model.Operation = CrudOperation.Add;
             model.ReturnUrl = returnUrl;

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

             // assign the return url
             ReturnUrl = returnUrl;

             return Page();
         }
コード例 #3
0
        public PageResult LoadPage(int id, string returnUrl)
        {
            // select a record by primary key(s)
            StudentEnquiryAPI.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>
 /// Initial handler the razor page encounters.
 /// </summary>
 public void OnGet()
 {
     WorkflowMasterDropDownListData = WorkflowMaster.SelectWorkflowMasterDropDownListData();
 }
 /// <summary>
 /// Sets data needed on page intialization.
 /// </summary>
 private void SetData()
 {
     WorkflowStepsMaster            = new TemporaryDBappllicationAPI.BusinessObject.WorkflowStepsMaster();
     WorkflowMasterDropDownListData = WorkflowMaster.SelectWorkflowMasterDropDownListData();
 }
コード例 #6
0
 /// <summary>
 /// Sets data needed on page intialization.
 /// </summary>
 private void SetData()
 {
     WorkflowStepsMaster            = new StudentEnquiryAPI.BusinessObject.WorkflowStepsMaster();
     WorkflowMasterDropDownListData = WorkflowMaster.SelectWorkflowMasterDropDownListData();
 }
コード例 #7
0
 /// <summary>
 /// Sets data needed on page intialization.
 /// </summary>
 private void SetData()
 {
     WorkflowStepsMaster            = new fifth_tempDBAPI.BusinessObject.WorkflowStepsMaster();
     WorkflowMasterDropDownListData = WorkflowMaster.SelectWorkflowMasterDropDownListData();
 }