Exemple #1
0
        public static void Serialize_SSCTechActivity(SSCTechActivity result, FileType fileType)
        {
            //if (!Directory.Exists(FilePathType.SerData.DirPath()))
            //{
            //    Directory.CreateDirectory(FilePathType.SerData.DirPath());
            //}

            //Stream stream = File.Open(String.Format("{0}{1}{2}.{3}", FilePathType.SerData.DirPath(), AppNEnvConfig.GetFileSeperator, result.SurveyRowID, fileType.ToString()), FileMode.Create);
            //BinaryFormatter bformatter = new BinaryFormatter();
            //bformatter.Serialize(stream, result);
            //stream.Close();

            if (!Directory.Exists(AppNEnvConfig.TechSerData))
            {
                Directory.CreateDirectory(AppNEnvConfig.TechSerData);
            }

            Stream stream = File.Open(String.Format("{0}{1}{2}.{3}", AppNEnvConfig.TechSerData, AppNEnvConfig.GetFileSeperator, result.SurveyRowID, fileType.ToString()), FileMode.Create);
            BinaryFormatter bformatter = new BinaryFormatter();
            bformatter.Serialize(stream, result);
            stream.Close();
        }
Exemple #2
0
 public RequestInfo(SSCTechActivity sSCTechActivity)
 {
     SSCTechActivity = sSCTechActivity;
 }
Exemple #3
0
        private static void PopulateRequestInfo(ref SSCTechActivity sSCTechActivity)
        {
            sSCTechActivity.ClientDisplayText = sSCTechActivity.ClientDisplayText.StartsWith("\r\n", StringComparison.OrdinalIgnoreCase) ? sSCTechActivity.ClientDisplayText.Substring(2) : sSCTechActivity.ClientDisplayText;
            sSCTechActivity.ClientDisplayText = sSCTechActivity.ClientDisplayText.EndsWith("\r\n", StringComparison.OrdinalIgnoreCase) ? sSCTechActivity.ClientDisplayText.Substring(0, sSCTechActivity.ClientDisplayText.Length - 2) : sSCTechActivity.ClientDisplayText;

            var survey = GetSurvey(sSCTechActivity.SurveyRowID);
            var rFT = GetRollForwardTransaction(sSCTechActivity.IsRFRequest, sSCTechActivity.SurveyRowID, sSCTechActivity.FAId);

            sSCTechActivity.ENGYear = survey.ENGYear;
            sSCTechActivity.PrimaryWBName = survey.Workbook1;

            sSCTechActivity.RequesterInfo = new UserInfo { FirstName = survey.FirstName, LastName = survey.LastName, EmailID = survey.eMail, Alias = survey.eMail.UserIdFromEmail() };

            if (rFT != null)
            {
                sSCTechActivity.ManagerInfo = new UserInfo { FirstName = rFT.ManagerFirstName, LastName = rFT.ManagerLastName, EmailID = survey.ManagerEmail, Alias = survey.ManagerEmail.UserIdFromEmail() };
                sSCTechActivity.PartnerInfo = new UserInfo { FirstName = rFT.PartnerFirstName, LastName = rFT.PartnerLastName, EmailID = survey.PartnerEmail, Alias = survey.PartnerEmail.UserIdFromEmail() };
                sSCTechActivity.ProjectCode = rFT.ProjectCode;
                sSCTechActivity.DCSServer = rFT.DcssServer;

            }
            else
            {
                sSCTechActivity.ManagerInfo = new UserInfo { FirstName = "", LastName = "", EmailID = survey.ManagerEmail, Alias = survey.ManagerEmail.UserIdFromEmail() };
                sSCTechActivity.PartnerInfo = new UserInfo { FirstName = "", LastName = "", EmailID = survey.PartnerEmail, Alias = survey.PartnerEmail.UserIdFromEmail() };
                sSCTechActivity.ProjectCode = "";
                sSCTechActivity.DCSServer = "";
            }
        }