Ejemplo n.º 1
0
        private static SurveyReport ToSurveyReport(GadgetBO gadget)
        {
            SurveyReport SurveyReport = new SurveyReport();

            SurveyReport.DateCreated   = gadget.CreatedDate;
            SurveyReport.DateEdited    = gadget.EditedDate;
            SurveyReport.ReportId      = Guid.Parse(gadget.ReportId);
            SurveyReport.GadgetVersion = gadget.GadgetVersion;

            // SurveyReport.GadgetsScript = gadget.GadgetsScript;
            SurveyReport.ReportHtml   = gadget.ReportHtml;
            SurveyReport.GadgetId     = Guid.Parse(gadget.GadgetId);
            SurveyReport.GadgetNumber = gadget.GadgetNumber;


            return(SurveyReport);
        }
Ejemplo n.º 2
0
        internal static GadgetBO ToGadgetBO(SurveyReport reportInfo)
        {
            GadgetBO GadgetBO = new GadgetBO();

            GadgetBO.CreatedDate = reportInfo.DateCreated;
            GadgetBO.EditedDate  = (DateTime)reportInfo.DateEdited;
            if (!string.IsNullOrEmpty(reportInfo.ReportId.ToString()))
            {
                GadgetBO.ReportId = reportInfo.ReportId.ToString();
            }

            GadgetBO.GadgetVersion = reportInfo.GadgetVersion;


            GadgetBO.ReportHtml   = reportInfo.ReportHtml;
            GadgetBO.GadgetId     = reportInfo.GadgetId.ToString();
            GadgetBO.GadgetNumber = reportInfo.GadgetNumber;
            return(GadgetBO);
        }