Example #1
0
 public ActionResult AddOrUpdateProductSchedule(ProductSchedulesModel model)
 {
     int status = _repositoryschedule.AddOrUpdate(model);
     if (status == 1)
     {
         var productgrplist = _productService.GetAllProductScheduleByProdId(int.Parse(model.Productid));
         return PartialView("Controls/Product/_ProductGroup", productgrplist);
     }
     return null;
 }
Example #2
0
        public ActionResult NewProductSchedule(string id, string prodid)
        {
            var currentuser = UserManager.Current();
            var schmodel = new ProductSchedulesModel();
            if (!string.IsNullOrEmpty(id))
            {
                schmodel = _repositoryschedule.GetById(int.Parse(id));
            }
            schmodel.Colorlist = _repositoryschedule.GetAllColors();
            if (currentuser != null)
            {
                if (!string.IsNullOrEmpty(prodid))
                {
                    var product = _productService.GetProductById(int.Parse(prodid));
                    schmodel.ProductGroupslist = _productService.GetProductgroupBySp(currentuser.OrgId.Value, product.ProductGroupId).ToList();
                }

            }
            return PartialView("Controls/Product/_ProductSchedule", schmodel);
        }