public void Update(CompanyInformation companyInformation)
 {
     var companyInfo = _dbSet.FirstOrDefault();
     if (companyInfo == null)
         _dbSet.Add(companyInformation);
     else
     {
         _dbSet.Attach(companyInformation);
         _dbesm.Entry(companyInformation).State = EntityState.Modified;
     }
 }
Esempio n. 2
0
        public MainReport(string reportTitle, CompanyInformation companyInformations)
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            ReportHeaderInformation.DataSource = companyInformations;
            TextReportTitle.Value = reportTitle;
        }