Beispiel #1
0
        private void GetSSCUser(RequestInfo requestInfo)
        {
            if (requestInfo == null)
                return;

            List<SSCUser> r = new List<SSCUser>();

            //if(!requestInfo.SSCTechActivity.IsKPMGOnly)
            if(requestInfo.SSCTechActivity.IsGDC)
            {
                var result = RepOperation.GetGDCUser(requestInfo.SSCTechActivity.BusinessUnit);

                if (result != null)
                {
                    result.ForEach(x => r.Add(new SSCUser
                    {
                        From = "GDC",
                        SSCInvitationUserType = Model.SSCInvitationUserType.GDC,
                        FirstName = x.FirstName,
                        LastName = x.LastName,
                        EmailID = x.EmailID,
                        Alias = x.Alias,
                        Initials = "",
                        Role = "Staff"
                    }));
                }
            }

            if (requestInfo.SSCTechActivity.ManagerInfo != null && !string.IsNullOrWhiteSpace(requestInfo.SSCTechActivity.ManagerInfo.EmailID))
            {
                r.Add(new SSCUser
                {
                    From = "Manager",
                    SSCInvitationUserType = Model.SSCInvitationUserType.Owners,
                    FirstName = requestInfo.SSCTechActivity.ManagerInfo.FirstName,
                    LastName = requestInfo.SSCTechActivity.ManagerInfo.LastName,
                    EmailID = requestInfo.SSCTechActivity.ManagerInfo.EmailID,
                    Alias = requestInfo.SSCTechActivity.ManagerInfo.Alias,
                    Initials = "",
                    Role = "Manager"
                });
            }

            if (requestInfo.SSCTechActivity.PartnerInfo != null && !string.IsNullOrWhiteSpace(requestInfo.SSCTechActivity.PartnerInfo.EmailID))
            {
                var existingUser = r.Where(x => x.Alias.Equals(requestInfo.SSCTechActivity.PartnerInfo.Alias, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();

                if (existingUser == null)
                {
                    r.Add(new SSCUser
                    {
                        From = "Partner",
                        SSCInvitationUserType = Model.SSCInvitationUserType.Owners,
                        FirstName = requestInfo.SSCTechActivity.PartnerInfo.FirstName,
                        LastName = requestInfo.SSCTechActivity.PartnerInfo.LastName,
                        EmailID = requestInfo.SSCTechActivity.PartnerInfo.EmailID,
                        Alias = requestInfo.SSCTechActivity.PartnerInfo.Alias,
                        Initials = "",
                        Role = "Partner"
                    });
                }
                else
                {
                    existingUser.From = existingUser.From + "/" + "Partner";
                }
            }

            if (requestInfo.SSCTechActivity.RequesterInfo != null && !string.IsNullOrWhiteSpace(requestInfo.SSCTechActivity.RequesterInfo.EmailID))
            {
                var existingUser = r.Where(x => x.Alias.Equals(requestInfo.SSCTechActivity.RequesterInfo.Alias, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();

                if (existingUser == null)
                {
                    r.Add(new SSCUser
                    {
                        From = "Requestor",
                        SSCInvitationUserType = Model.SSCInvitationUserType.Owners,
                        FirstName = requestInfo.SSCTechActivity.RequesterInfo.FirstName,
                        LastName = requestInfo.SSCTechActivity.RequesterInfo.LastName,
                        EmailID = requestInfo.SSCTechActivity.RequesterInfo.EmailID,
                        Alias = requestInfo.SSCTechActivity.RequesterInfo.Alias,
                        Initials = "",
                        Role = "Staff"
                    });
                }
                else
                {
                    existingUser.From = existingUser.From + "/" + "Requestor";
                }
            }

            this.SSCUsers = r;
        }
Beispiel #2
0
        public SSCTechInfo(RequestInfo requestInfo)
        {
            this.EngNum = requestInfo.SSCTechActivity.EngagementNumber;
            this.IsEngUnderPreservation = requestInfo.SSCTechActivity.IsEngPreservation;
            this.IsKPMGOnly = requestInfo.SSCTechActivity.IsKPMGOnly;
            this.IsGDC = requestInfo.SSCTechActivity.IsGDC;
            this.BusinessUnit = requestInfo.SSCTechActivity.BusinessUnit;
            this.ProjectCode = requestInfo.SSCTechActivity.ProjectCode;
            this.DCSServerOriginal = requestInfo.SSCTechActivity.DCSServer;
            this.SurveyId = requestInfo.SSCTechActivity.SurveyRowID;
            this.FAId = requestInfo.SSCTechActivity.FAId;
            this.SourceFileName = requestInfo.SSCTechActivity.FileName;
            this.SourceFileSizeOriginal = requestInfo.SSCTechActivity.FileSize.GetValueOrDefault(0);
            this.SourceKDrivePath = requestInfo.SSCTechActivity.KDrivePath;
            this.UploadKDrivePath = requestInfo.SSCTechActivity.RootUploadKDrivePath;
            this.Manager = requestInfo.SSCTechActivity.ManagerInfo.EmailID;
            this.Partner = requestInfo.SSCTechActivity.PartnerInfo.EmailID;
            this.Requester = requestInfo.SSCTechActivity.RequesterInfo.EmailID;
            this.RequestType = requestInfo.SSCTechActivity.IsRFRequest ? "RF" : "RET";

            this.PrimaryWBName = requestInfo.SSCTechActivity.PrimaryWBName;
            this.ENGYear = requestInfo.SSCTechActivity.ENGYear;
            this.OutputFileName = requestInfo.SSCTechActivity.OutputFileName;
        }
Beispiel #3
0
        //uspUpdateRFTransFromTechMachine
        //@SurveyRowId     INT,
        //@MAFGuid      VARCHAR(50),
        //@OutputFileLocation    VARCHAR(MAX),
        //@IsNewRFAvailableInDCSS   BIT,
        //@DcssServerName     VARCHAR(50) = NULL,
        //@Comments      VARCHAR(MAX) = NULL
        public static void UpdateRollForwardTransactions(RequestInfo requestInfo)
        {
            using (SSCTechImp.CreateInstance())
            {
                using (var db = new SSCTechClientDbCntx())
                {
                    SqlParameter p1 = new SqlParameter("@SurveyRowId", requestInfo.SSCTechActivity.SurveyRowID);
                    SqlParameter p2 = new SqlParameter("@MAFGuid", requestInfo.SSCTechActivity.OutputMAFGuid);
                    SqlParameter p3 = new SqlParameter("@OutputFileLocation", requestInfo.SSCTechActivity.RootUploadKDrivePath);
                    SqlParameter p4 = new SqlParameter("@IsNewRFAvailableInDCSS", requestInfo.IsDCSServerValidated);
                    SqlParameter p5 = new SqlParameter("@DcssServerName", requestInfo.SSCTechActivity.DCSServer);
                    SqlParameter p6 = new SqlParameter("@Comments", "");

                    db.Database.ExecuteSqlCommand("EXEC uspUpdateRFTransFromTechMachine @SurveyRowId, @MAFGuid, @OutputFileLocation, @IsNewRFAvailableInDCSS, @DcssServerName, @Comments"
                            , p1, p2, p3, p4, p5, p6);
                }
            }
        }
Beispiel #4
0
 public static void UpdateRollForwardTransactions(RequestInfo requestInfo)
 {
     TechOperation.UpdateRollForwardTransactions(requestInfo);
 }