Beispiel #1
0
        public ActionResult AllotmentDetails(int id)
        {
            AllotementDetailModel model = new AllotementDetailModel();

            model.AllotmentDetailList = pro.GetAllotmentsDetails(id);
            return(View(model));
        }
Beispiel #2
0
        public ActionResult AllotmentDetails(AllotementDetailModel model)
        {
            string s = "";

            s = proA.Update(model.AllotmentDetailList);
            if (s != "")
            {
                TempData["message"] = s;
                return(RedirectToAction("AllotmentDetails"));
            }
            return(RedirectToAction("AllotmentMaster"));
        }
Beispiel #3
0
        public ActionResult AllotmentReport(int id)
        {
            EHMSEntities          ent   = new EHMSEntities();
            AllotementDetailModel model = new AllotementDetailModel();

            model.AllotmentDetailList = pro.GetAllotmentsDetails(id);
            model.Remarks             = ent.ItemAllotmentMasters.Where(x => x.ItemAllotmentMasterID == id).SingleOrDefault().ItemAllotmentNo;
            foreach (var item in model.AllotmentDetailList)
            {
                try
                {
                    item.QuantityRemained = (from am in ent.ItemAllotmentMasters
                                             join dd in ent.ItemDemandDetails
                                             on am.ItemDemandID equals dd.ItemDemandID
                                             where am.ItemAllotmentMasterID == id
                                             where dd.ItemID == item.ItemID
                                             select dd).SingleOrDefault().QuantityDemand;
                }
                catch { item.QuantityRemained = 0; }
            }
            return(View(model));
        }