Пример #1
0
        public ActionResult GetStockResursFelt(int id)
        {
            db.Configuration.ProxyCreationEnabled = false;
            List <ExitStockModel> vm = new List <ExitStockModel>();

            foreach (var item in db.STOCKS.Where(w => w.TYPE == id && w.QUANTITY > 0))
            {
                ExitStockModel onestock = new ExitStockModel();
                onestock.OBJECTID    = item.OBJECTID;
                onestock.PRODUCTNAME = db.FERTILIZERs.Where(t => t.OBJECTID == item.PRODUCT_ID).FirstOrDefault().NAME;
                onestock.TOTAL       = item.QUANTITY.ToString();
                vm.Add(onestock);
            }
            ;
            return(Json(vm, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public ActionResult GetStockResursTech(int id)
        {
            db.Configuration.ProxyCreationEnabled = false;
            List <ExitStockModel> vm = new List <ExitStockModel>();

            foreach (var item in db.STOCKS.Where(w => w.TYPE == id && w.QUANTITY > 0))
            {
                ExitStockModel onestock = new ExitStockModel();
                onestock.OBJECTID    = item.OBJECTID;
                onestock.PRODUCTNAME = db.TECHNIQUES.Where(t => t.OBJECTID == item.PRODUCT_ID).FirstOrDefault().NAME + " " + JsonConvert.DeserializeObject <TechnicalSPEC>(item.SPEC).licenseplate;
                onestock.TOTAL       = item.QUANTITY.ToString();
                vm.Add(onestock);
            }
            ;
            return(Json(vm, JsonRequestBehavior.AllowGet));
        }
Пример #3
0
        //anbarda olan bitki ve meyvelerin siyahisi
        public ActionResult GetOutCropStok(int id)
        {
            db.Configuration.ProxyCreationEnabled = false;
            List <ExitStockModel> vm = new List <ExitStockModel>();

            foreach (var item in db.STOCKS.Where(w => w.TYPE == id && w.QUANTITY > 0))
            {
                CropSPEC       _cropSpecial = JsonConvert.DeserializeObject <CropSPEC>(item.SPEC);
                string         cropName     = db.CROPs.Where(t => t.OBJECTID == item.PRODUCT_ID).FirstOrDefault().NAME;
                string         SortName     = db.CROP_SORT.Where(s => s.OBJECTID == _cropSpecial.CropSortID).FirstOrDefault().NAME;
                string         RepreducName = db.CROP_REPRODUCTION.Where(s => s.OBJECTID == _cropSpecial.CropRepreducsiya).FirstOrDefault().NAME;
                ExitStockModel onestock     = new ExitStockModel();
                onestock.OBJECTID    = item.OBJECTID;
                onestock.PRODUCTNAME = cropName + " - " + SortName + "  (" + RepreducName + ")";
                onestock.TOTAL       = item.QUANTITY.ToString();
                vm.Add(onestock);
            }
            ;
            return(Json(vm, JsonRequestBehavior.AllowGet));
        }