Beispiel #1
0
        /// <summary>
        /// method to fetch values from grid and assign to textbox
        /// </summary>
        private void GetApprover()
        {
            WorkFlowBLL WorkFlowBLLobj = new WorkFlowBLL();
            int         WORKAPPROVALID = 0;

            if (ViewState["WorkApprovalID"] != null)
            {
                WORKAPPROVALID = Convert.ToInt32(ViewState["WorkApprovalID"]);
            }

            if (WORKAPPROVALID != 0)
            {
                WorkFlowBO WorkFlowObj = new WorkFlowBO();
                WorkFlowObj = WorkFlowBLLobj.GetWorkFlowById(WORKAPPROVALID);

                ApproverRoleNameDropDownList.ClearSelection();
                if (ApproverRoleNameDropDownList.Items.FindByValue(WorkFlowObj.RoleID.ToString()) != null)
                {
                    ApproverRoleNameDropDownList.Items.FindByValue(WorkFlowObj.RoleID.ToString()).Selected = true;
                }

                int RoleID = WorkFlowObj.RoleID;
                getUserByRoleID(RoleID);

                ApproverNameDropDownList.ClearSelection();
                if (ApproverNameDropDownList.Items.FindByValue(WorkFlowObj.UserID.ToString()) != null)
                {
                    ApproverNameDropDownList.Items.FindByValue(WorkFlowObj.UserID.ToString()).Selected = true;
                }

                ApproverLevelDropDownList.ClearSelection();
                if (ApproverLevelDropDownList.Items.FindByValue(WorkFlowObj.LEVEL.ToString()) != null)
                {
                    ApproverLevelDropDownList.Items.FindByValue(WorkFlowObj.LEVEL.ToString()).Selected = true;
                }
                ApproverLevelDropDownList.Enabled = false;

                WorkApproverIDTextBox.Text = WorkFlowObj.WorkApprovalID.ToString();
                WorkDefinationTextBox.Text = WorkFlowObj.WorkFlowDefID.ToString();
            }
        }