//
        // GET: /Party/

        public ActionResult Add(string ID)
        {
            ViewBag.TransportList = TransportLogic.GetTransportByID(0);
            ViewBag.PartyGroups   = PartyGroupLogic.GetAllPartyGroup();
            if (Convert.ToInt32(ID) > 0)
            {
                var party = PartyLogic.GetPartyByID(Convert.ToInt32(ID)).FirstOrDefault();
                return(View(party));
            }
            else
            {
                return(View(new Party()));
            }
        }
Beispiel #2
0
        //
        // GET: /Inward/

        public ActionResult Add(string ID)
        {
            ViewBag.Parties  = PartyLogic.GetPartyByID(0).Where(x => x.PartyGroupID == (PartyGroupLogic.GetAllPartyGroup().FirstOrDefault(y => y.GroupCode == "100004").ID)).OrderBy(x => x.Name);
            ViewBag.Products = ProductLogic.GetRawMaterialProducts();
            if (Convert.ToInt32(ID) > 0)
            {
                var Inward = InwardLogic.GetInwardByID(Convert.ToInt32(ID)).FirstOrDefault();
                return(View(Inward));
            }
            else
            {
                return(View(new Inward()));
            }
        }
Beispiel #3
0
        //
        // GET: /Order/

        public ActionResult Add(string ID)
        {
            ViewBag.Dispatch   = false;
            ViewBag.Parties    = PartyLogic.GetPartyByID(0).Where(x => x.PartyGroupID == (PartyGroupLogic.GetAllPartyGroup().FirstOrDefault(y => y.GroupCode == "100003").ID)).OrderBy(x => x.Name);
            ViewBag.Transports = TransportLogic.GetTransportByID(0);
            ViewBag.Products   = ProductLogic.GetFinishedProducts();
            if (Convert.ToInt32(ID) > 0)
            {
                var order = OrderLogic.GetOrderByID(Convert.ToInt32(ID)).FirstOrDefault();
                ViewBag.Addresses = PartyAddressLogic.GetPartyAddress(order.PartyID);
                return(View(order));
            }
            else
            {
                var order = new Order();
                order.OrderNo = OrderLogic.GetMaxOrderNo();
                return(View(order));
            }
        }