/// <summary>
        /// düzenle
        /// </summary>
        public PartialViewResult FloorDetailPartial(string Id)
        {
            if (CheckPerm(Perms.KatKartı, PermTypes.Reading) == false)
            {
                return(null);
            }
            var tmp = Convert.ToInt32(Id);

            if (tmp == 0)
            {
                ViewBag.DepoID    = new SelectList(Store.GetList(), "ID", "DepoAd");
                ViewBag.RafID     = new SelectList(Shelf.GetList(0), "ID", "RafAd");
                ViewBag.BolumID   = new SelectList(Section.GetList(0), "ID", "BolumAd");
                ViewBag.OzellikID = new SelectList(ComboSub.GetList(Combos.Özellik.ToInt32()), "ID", "Name");
                return(PartialView("_FloorDetailPartial", new Kat()));
            }
            else
            {
                var tablo = Floor.Detail(tmp);
                ViewBag.DepoID    = new SelectList(Store.GetList(), "ID", "DepoAd", tablo.Bolum.Raf.Koridor.DepoID);
                ViewBag.RafID     = new SelectList(Shelf.GetList(tablo.Bolum.Raf.KoridorID), "ID", "RafAd", tablo.Bolum.RafID);
                ViewBag.BolumID   = new SelectList(Section.GetList(tablo.Bolum.RafID), "ID", "BolumAd", tablo.BolumID);
                ViewBag.OzellikID = new SelectList(ComboSub.GetList(Combos.Özellik.ToInt32()), "ID", "Name", tablo.OzellikID);
                return(PartialView("_FloorDetailPartial", tablo));
            }
        }
Exemple #2
0
 /// <summary>
 /// anasayfası
 /// </summary>
 public ActionResult Index()
 {
     if (CheckPerm(Perms.BölümKartı, PermTypes.Reading) == false)
     {
         return(Redirect("/"));
     }
     ViewBag.DepoID = new SelectList(Store.GetList(), "ID", "DepoAd");
     ViewBag.RafID  = new SelectList(Shelf.GetList(0), "ID", "RafAd");
     return(View("Index", new Bolum()));
 }
 /// <summary>
 /// manual yer değiştir
 /// </summary>
 public ActionResult ManualMovement()
 {
     if (CheckPerm(Perms.Stok, PermTypes.Reading) == false)
     {
         return(Redirect("/"));
     }
     ViewBag.DepoID  = new SelectList(Store.GetList(vUser.DepoId), "ID", "DepoAd");
     ViewBag.RafID   = new SelectList(Shelf.GetList(0), "ID", "RafAd");
     ViewBag.BolumID = new SelectList(Section.GetList(0), "ID", "BolumAd");
     ViewBag.KatID   = new SelectList(Floor.GetList(0), "ID", "KatAd");
     return(View("ManualMovement", new Yer()));
 }
Exemple #4
0
        /// <summary>
        /// düzenle
        /// </summary>
        public PartialViewResult SectionDetailPartial(string Id)
        {
            if (CheckPerm(Perms.BölümKartı, PermTypes.Reading) == false)
            {
                return(null);
            }
            var tmp = Convert.ToInt32(Id);

            if (tmp == 0)
            {
                ViewBag.DepoID = new SelectList(Store.GetList(), "ID", "DepoAd");
                ViewBag.RafID  = new SelectList(Shelf.GetList(0), "ID", "RafAd");
                return(PartialView("_SectionDetailPartial", new Bolum()));
            }
            else
            {
                var tablo = Section.Detail(tmp);
                ViewBag.DepoID = new SelectList(Store.GetList(), "ID", "DepoAd", tablo.Raf.Koridor.DepoID);
                ViewBag.RafID  = new SelectList(Shelf.GetList(tablo.Raf.KoridorID), "ID", "RafAd", tablo.RafID);
                return(PartialView("_SectionDetailPartial", tablo));
            }
        }
Exemple #5
0
        public JsonResult ShelfList()
        {
            var id = Url.RequestContext.RouteData.Values["id"];

            if (id == null)
            {
                return(null);
            }
            if (CheckPerm(Perms.RafKartı, PermTypes.Reading) == false)
            {
                return(Json(new Result(false, "Yetkiniz yok"), JsonRequestBehavior.AllowGet));
            }
            List <Raf> _List = new List <Raf>();

            try
            {
                _List = Shelf.GetList().Where(a => a.KoridorID == Convert.ToInt16(id)).ToList();
                List <SelectListItem> List = new List <SelectListItem>();
                foreach (Raf item in _List)
                {
                    List.Add(new SelectListItem
                    {
                        Selected = false,
                        Text     = item.Koridor.KoridorAd + "-" + item.RafAd,
                        Value    = item.ID.ToString()
                    });
                }

                return(Json(List.Select(x => new { Value = x.Value, Text = x.Text, Selected = x.Selected }), JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                Logger(ex, "Shelf/ShelfList");
                return(Json(_List, JsonRequestBehavior.AllowGet));
            }
        }