Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                var                _context    = new LoginData.RAL_DevEntities();
                int                po          = 0;
                int                store       = 0;
                int                vendor      = 0;
                string             sdate       = string.Empty;
                string             edate       = string.Empty;
                List <ReportTable> reportTable = null;
                reportTable = _context.ReportTables.ToList();
                RALListReportViewer.LocalReport.ReportPath = Server.MapPath("~/Reports/RDLC/RALReport.rdlc");
                RALListReportViewer.LocalReport.DataSources.Clear();
                ReportDataSource rdc = new ReportDataSource("DSRALReport", reportTable);
                RALListReportViewer.LocalReport.DataSources.Add(rdc);
                RALListReportViewer.LocalReport.Refresh();
                RALListReportViewer.DataBind();

                //if (Request.QueryString["searchText"] != null)
                //{
                //    searchText = Request.QueryString["searchText"].ToString();
                //}
                //if (Request.QueryString["po"] != null)
                //{
                //    po = Convert.ToInt32(Request.QueryString["po"]);

                //    //reportTable = _context.ReportTables.Where(a => a.PONUMB == po).ToList();
                //}
                //else
                //{

                //}
            }
        }
Example #2
0
 public void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (context != null)
         {
             context.Dispose();
             context = null;
         }
     }
 }
 public void AddLastLogin(DomainEntity.LastLoginEntity entity)
 {
     try
     {
         using (var datacontext = new LoginData.RAL_DevEntities())
         {
             datacontext.Last_LogIn.Add(_mapper.Map <DomainEntity.LastLoginEntity, LoginData.Last_LogIn>(entity));
             datacontext.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Example #4
0
        public ReportRepository
        (
            IMapper mapper,
            LoginData.IRALUnitOfWork rAlUnitOfWork
        )
        {
            if (mapper == null)
            {
                throw new ArgumentNullException("Mapper");
            }
            if (rAlUnitOfWork == null)
            {
                throw new ArgumentNullException("RALUnitOfWork");
            }

            _mapper       = mapper;
            _rALDbContext = rAlUnitOfWork.DbContext;
        }