Example #1
0
        public IEnumerable <TaxRecord> CurrentSelection()
        {
            //return db.TaxRecords.Where(x => x.ROWNO == db.TaxRecords.Where(y => y.CONO == x.CONO).Max(z => z.ROWNO)).OrderByDescending(x => x.SDATE);

            string pSearchCode = "";
            string pSearchName = "";


            DateTime pSearchVdate = DateTime.Parse("01/01/0001");
            DateTime pSearchDdate = DateTime.Parse("01/01/0001");

            if (Session["SearchTaxRecordRec"] != null)
            {
                TaxRecord searchRec = (TaxRecord)(Session["SearchTaxRecordRec"]);
                pSearchCode  = searchRec.cono ?? "";
                pSearchName  = searchRec.coname ?? "";
                pSearchVdate = searchRec.entdate;
                pSearchDdate = searchRec.DUEDATE;
            }
            else
            { // start with current month proforma bills instead of entire list
                pSearchVdate = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
                pSearchDdate = pSearchVdate.AddMonths(1).AddDays(-1);
            }



            DateTime rptStart = pSearchVdate;
            DateTime rptEnd   = pSearchDdate;

            ViewBag.RPT_START = rptStart.ToString("dd/MM/yyyy");
            ViewBag.RPT_END   = rptEnd.ToString("dd/MM/yyyy");

            FbContext fbcon = FbContext.Create();
            IEnumerable <TaxRecord> TaxRecords = fbcon.PopulateTaxesRcp(pSearchVdate, pSearchDdate, (string)Session["SearchTaxRecordSort"]);

            return(TaxRecords);
        }
Example #2
0
 public UserService(FbContext fbContext, UserManager <User> _userManager, SignInManager <User> _signInManager)
 {
     context       = fbContext;
     userManager   = _userManager;
     signInManager = _signInManager;
 }
 public ConnectionService(FbContext fbContext)
 {
     context = fbContext;
 }
 public ProductsController(FbContext context)
 {
     _context = context;
 }
 public MessageService(FbContext context)
 {
     _context = context;
 }
Example #6
0
 public UsersController(FbContext context)
 {
     _context = context;
 }
Example #7
0
 public PostService(FbContext fbContext, UserManager <User> _userManager, IUserService _userservice)
 {
     context     = fbContext;
     userManager = _userManager;
     userService = _userservice;
 }
 public NotificationsController(FbContext context)
 {
     _context = context;
 }