コード例 #1
0
        private void InitControlsByRequest(int RequestID)
        {
            var dr = Assign.GetRerouteRequestProperties(RequestID);

            if (dr == null)
            {
                throw new ApplicationException("There is a problem to locate current request. Please reload the page.");
            }

            txtRequestID.Value       = RequestID.ToString();
            txtCurrentReviewer.Value = ((int)Utility.GetNotNullValue(dr["ReviewerUserID"], "Int")).ToString();

            lblDocNumber.Text = (string)dr["DocNumber"];
            var lines = (int)dr["ItemLNum"];

            txtLines.Value = lines.ToString();
            if (lines == 0)
            {
                lblLines.Text = "all";
            }
            else
            {
                lblLines.Text = lines.ToString();
            }

            var intItemID = (int)dr["OItemID"];

            txtItemID.Value = intItemID.ToString();
            var strOrgCode = (string)Utility.GetNotNullValue(dr["ULOOrgCode"], "String");

            lblOrgCode.Text      = strOrgCode;
            lblPrevReviewer.Text = (string)Utility.GetNotNullValue(dr["ReviewerName"], "String");

            var intSelectedUserID = (int)Utility.GetNotNullValue(dr["RerouteUserID"], "Int");
            var strSelectedOrg    = (string)Utility.GetNotNullValue(dr["RerouteOrgCode"], "String");

            if ((string)Utility.GetNotNullValue(dr["Responsibility"], "String") == Lookups.GetOrganizationByOrgCode(strOrgCode))
            {
                //if reroute requested for the same Organization, init fields for Assign:
                txtCommentAssign.Value = (string)Utility.GetNotNullValue(dr["Comments"], "String");
                InitAssignUsersList(intItemID, strOrgCode, intSelectedUserID);
                InitUsersOrganizationsList("", 0);
            }
            else
            {
                //if reroute requested for the other Organization, init fields for Reroute Request to BD:
                txtCommentReroute.Value = (string)Utility.GetNotNullValue(dr["Comments"], "String");
                InitAssignUsersList(intItemID, strOrgCode, 0);
                InitUsersOrganizationsList(strSelectedOrg, intSelectedUserID);
            }
        }
コード例 #2
0
        private void InitControlsByRequest(int RequestID)
        {
            var dr = Assign.GetRerouteRequestProperties(RequestID);

            if (dr == null)
            {
                throw new ApplicationException("There is a problem to locate current request. Please reload the page.");
            }

            txtRequestID.Value        = RequestID.ToString();
            txtPrevOrganization.Value = (string)Utility.GetNotNullValue(dr["ResponsibleOrg"], "String") + " : " + (string)Utility.GetNotNullValue(dr["ULOOrgCode"], "String");
            txtPrevReviewer.Value     = ((int)Utility.GetNotNullValue(dr["ReviewerUserID"], "Int")).ToString();

            lblDocNumber.Text = (string)dr["DocNumber"];
            var lines = (int)dr["ItemLNum"];

            if (lines == 0)
            {
                lblLines.Text = "all";
            }
            else
            {
                lblLines.Text = lines.ToString();
            }
            lblPrevOrganization.Text = (string)Utility.GetNotNullValue(dr["ResponsibleOrg"], "String");
            lblPrevOrgCode.Text      = (string)Utility.GetNotNullValue(dr["ULOOrgCode"], "String");
            lblPrevReviewerName.Text = (string)Utility.GetNotNullValue(dr["ReviewerName"], "String");
            txtComment.Value         = (string)Utility.GetNotNullValue(dr["Comments"], "String");

            var intSelectedUserID = (int)Utility.GetNotNullValue(dr["RerouteUserID"], "Int");
            var strSelectedOrg    = (string)Utility.GetNotNullValue(dr["RerouteOrgCode"], "String");

            ctrlOrgUsers.OrganizationLabel = "Suggested Organization:";
            ctrlOrgUsers.UsersLabel        = "Suggested Reviewer:";
            ctrlOrgUsers.InitLists();

            ctrlOrgUsers.SelectedOrgCode = strSelectedOrg;
            ctrlOrgUsers.SelectedUserID  = intSelectedUserID;
        }