Exemplo n.º 1
0
        public ActionResult Index()
        {
            ViewBag.Message = User.Identity.IsAuthenticated
        ? LiteDispatchSession.UserProfile().HaulierName
        : "Register before using the application";

            UpdateStats();

            return(View());
        }
Exemplo n.º 2
0
        private DispatchNoteModel GetDispatchNote(UploadDispatchModel model)
        {
            var result = new DispatchNoteModel {
                DispatchNoteStatus = DispatchNoteStatusEnum.New, DispatchDate = model.DispatchDate.Value, HaulierName = "UnKnown", TruckReg = model.TruckReg, DispatchReference = model.ReferenceNumber
            };
            var haulier = LiteDispatchSession.UserHaulier();

            result.HaulierId   = haulier.Id;
            result.HaulierName = haulier.Name;
            var linea = new DispatchLineModel
            {
                Id          = 1,
                ProductType = "Fresh",
                Product     = "Hake",
                Metric      = "Kg",
                Quantity    = 25,
                ShopId      = 18,
                Client      = "RedSquid"
            };

            result.Lines.Add(linea);

            linea = new DispatchLineModel
            {
                Id          = 2,
                ProductType = "Frozen",
                Product     = "Frozen Squid",
                Metric      = "Pallet",
                Quantity    = 4,
                ShopId      = 4,
                ShopLetter  = "A",
                Client      = "Alaska Brothers"
            };

            result.Lines.Add(linea);

            linea = new DispatchLineModel
            {
                Id          = 3,
                ProductType = "Shellfish",
                Product     = "Mussel",
                Metric      = "Sac",
                Quantity    = 20,
                ShopId      = 112,
                Client      = "Irish Seafoods"
            };

            result.Lines.Add(linea);

            return(result);
        }