Exemplo n.º 1
0
        private void Approve(TreeNode oParent, int _step, int _approval)
        {
            foreach (TreeNode oNode in oParent.ChildNodes)
            {
                if (oNode.Checked == true)
                {
                    int intUser = Int32.Parse(oNode.Value);
                    switch (_step)
                    {
                    case 1:
                        oApprove.ManagerApproval(intRequest, intUser, _approval, intWorkflowPage, "", boolDirector);
                        break;

                    case 2:
                        oApprove.PlatformApproval(intRequest, intUser, _approval, intWorkflowPage, "", boolDirector);
                        break;

                    case 3:
                        oApprove.BoardApproval(intRequest, intUser, _approval, intWorkflowPage, intWorkloadPage, "", intResourceRequestPage, boolDirector);
                        break;

                    case 4:
                        oApprove.DirectorApproval(intRequest, intUser, _approval, intWorkflowPage, intWorkloadPage, "", intResourceRequestPage);
                        break;
                    }
                }
            }
        }
Exemplo n.º 2
0
        protected void btnSubmit_Click(Object Sender, EventArgs e)
        {
            Button oButton = (Button)Sender;
            int    intStep = Int32.Parse(lblStep.Text);

            switch (intStep)
            {
            case 1:
                oApprove.ManagerApproval(Int32.Parse(lblRequest.Text), intProfile, Int32.Parse(oButton.CommandArgument), intWorkflowPage, "", boolDirector);
                break;

            case 2:
                oApprove.PlatformApproval(Int32.Parse(lblRequest.Text), intProfile, Int32.Parse(oButton.CommandArgument), intWorkflowPage, "", boolDirector);
                break;

            case 3:
                oApprove.BoardApproval(Int32.Parse(lblRequest.Text), intProfile, Int32.Parse(oButton.CommandArgument), intWorkflowPage, intWorkloadPage, "", intResourceRequestPage, boolDirector);
                break;

            case 4:
                oApprove.DirectorApproval(Int32.Parse(lblRequest.Text), intProfile, Int32.Parse(oButton.CommandArgument), intWorkflowPage, intWorkloadPage, "", intResourceRequestPage);
                break;
            }
            Response.Redirect(oPage.GetFullLink(intPage) + "?rid=" + lblRequest.Text + "&action=done");
        }