예제 #1
0
        public ActionResult _DropDownList(string selectedReportName)
        {
            DB.MSBDWEntities DB_MSDBW = new DB.MSBDWEntities();
            var re = DB_MSDBW.SSRSReport1.Where(r => r.rpt_name != null).OrderBy(r => r.rpt_name).Select(r => r.rpt_name).ToList();

            ReportsViewModel reports = new ReportsViewModel()
            {
                names = re
            };

            ViewData["selectedReportName"] = selectedReportName;
            return(PartialView("_DropDownList", reports));
        }
예제 #2
0
 public LinkagesViewModel(List <DB.ReportLinkage> rls)
 {
     reportLinkages = new List <ReportLinkage>();
     DB.MSBDWEntities Db_MSBDW = new DB.MSBDWEntities();
     foreach (var rl in rls)
     {
         ReportLinkage temp = new ReportLinkage();
         temp.ID                = rl.ID;
         temp.LinkageType       = rl.LinkageType;
         temp.LinkageLocation   = rl.LinkLocation;
         temp.RowCreateDate     = Convert.ToDateTime(rl.RowCreateDate);
         temp.CreateEndUserName = rl.CreateEnduserId == null ? "":Db_MSBDW.endusers.FirstOrDefault(eu => eu.id == rl.CreateEnduserId).full_name;
         reportLinkages.Add(temp);
     }
 }
        public StoredProcsViewModel(List <DB.ReportSP> sPs, int ReportId)
        {
            reportSPs = new List <ReportSP>();
            DB.MSBDWEntities DB_MSBDW = new DB.MSBDWEntities();

            foreach (var sp in sPs)
            {
                ReportSP temp = new ReportSP();
                temp.ID                = sp.ID;
                temp.SPName            = sp.SPName;
                temp.IsRDLDropdown     = Convert.ToBoolean(sp.IsRDLDropdown);
                temp.PermissionNotes   = sp.PermissionsNotes;
                temp.CreateEndUserName = sp.CreateEnduserId == null ? "": DB_MSBDW.endusers.FirstOrDefault(eu => eu.id == sp.CreateEnduserId).full_name;
                temp.RowCreateDate     = Convert.ToDateTime(sp.RowCreateDate);
                temp.ModifyEndUserName = sp.ModifyEnduserId == null ? "":DB_MSBDW.endusers.FirstOrDefault(eu => eu.id == sp.ModifyEnduserId).full_name;
                temp.RowModifyDate     = Convert.ToDateTime(sp.RowModifyDate);
                temp.LinkedDate        = Convert.ToDateTime(DB_MSBDW.Report_ReportSP.FirstOrDefault(s => s.ReportSPId == sp.ID && s.SSRSReportId == ReportId).RowCreateDate);
                reportSPs.Add(temp);
            }
        }
예제 #4
0
        public ParametersViewModel(List <DB.ReportSPParameter> rps)
        {
            reportSPParameters = new List <ReportSPParameter>();
            DB.MSBDWEntities DB_MSBDW = new DB.MSBDWEntities();
            foreach (var rp in rps)
            {
                ReportSPParameter temp = new ReportSPParameter();
                temp.ID = rp.ID;
                try { temp.SPName = DB_MSBDW.ReportSPs.FirstOrDefault(sp => sp.ID == rp.ReportSPId).SPName; }
                catch (Exception)
                { }

                temp.RDLParamName      = rp.RDLParameterName;
                temp.ParameterDesc     = rp.ParamDescription;
                temp.IsUserControlled  = rp.IsUserControlled != null?(rp.IsUserControlled == true ? "User Controlled" : "Set Value"): null;
                temp.UserControlType   = rp.UserControlType;
                temp.IsSetvalue        = rp.IsSetValue != null?(rp.IsSetValue == true ? "True" : "False"):null;
                temp.DefaultValue      = rp.DefaultValue;
                temp.AdditionalInfo    = rp.AdditionalInfo;
                temp.RowCreateDate     = Convert.ToDateTime(rp.RowCreateDate);
                temp.CreateEndUserName = rp.CreateEnduserId == null ? "":DB_MSBDW.endusers.FirstOrDefault(eu => eu.id == rp.CreateEnduserId).full_name;
                reportSPParameters.Add(temp);
            }
        }