public ActionResult Edit(WarehouseSocetModel model)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    var socet = Mapper.Map<WarehouseSocet>(model);
                    var result = WarehouseSocetService.UpdateWarehouseSocet(socet);

                    if (result.Succes)
                        return RedirectToAction("list");
                }
                catch
                {
                    return View(model);
                }
            }
            return View(model);
        }
        public JsonResult GetSocetByBarcodeAjax(string barcode)
        {
            var model = new WarehouseSocetModel();
            try
            {
                 var socet = WarehouseSocetService.GetSocetByBarcode(barcode);
                if (socet != null)
                {
                    model = Mapper.Map<WarehouseSocetModel>(socet);
                    model.SetSucces();
                }
                else
                {
                    model.SetError(String.Format(ResSocet.NoSocetToBarcode, barcode));
                }
            }
            catch (Exception ex)
            {
                model.SetError(ex);
            }

            return Json(model, JsonRequestBehavior.AllowGet);
        }
 // GET: WarehouseSocet/Create
 public ActionResult Create()
 {
     var model = new WarehouseSocetModel();
     return View(model);
 }