예제 #1
0
 public ActionResult Search(UnitOfMeasureViewModel model)
 {
     try
     {
         model.ListItem = _factory.GetData(CurrentUser.ListOrganizationId);
     }
     catch (Exception e)
     {
         _logger.Error("UOMSearch: " + e);
         return(new HttpStatusCodeResult(400, e.Message));
     }
     return(PartialView("_ListData", model));
 }
예제 #2
0
        public void GetFillData(List <string> lstMerchatIds)
        {
            ListUOM = new List <SelectListItem>();
            UnitOfMeasureFactory _UOMFactory = new UnitOfMeasureFactory();

            var lstItem = _UOMFactory.GetData(lstMerchatIds).Where(x => x.IsActive).ToList();

            if (lstItem != null)
            {
                foreach (UnitOfMeasureModel uom in lstItem)
                {
                    ListUOM.Add(new SelectListItem
                    {
                        Text  = uom.Name,
                        Value = uom.Id
                    });
                }
            }
        }
예제 #3
0
        public IngredientUOMModels()
        {
            ReceivingQty = 1;
            ListUOM      = new List <SelectListItem>();
            UnitOfMeasureFactory _UOMFactory = new UnitOfMeasureFactory();

            if (System.Web.HttpContext.Current.Session["User"] != null)
            {
                var user    = (UserSession)System.Web.HttpContext.Current.Session["User"];
                var lstItem = _UOMFactory.GetData(user.ListOrganizationId).Where(x => x.IsActive).ToList();
                if (lstItem != null)
                {
                    foreach (UnitOfMeasureModel uom in lstItem)
                    {
                        ListUOM.Add(new SelectListItem
                        {
                            Text  = uom.Name,
                            Value = uom.Id
                        });
                    }
                }
            }
        }