public string CheckDuplicateName(string Name, string ID) { var groups = ProductGroupLogic.GetProductGroupByID(0); if (groups != null && groups.Count() > 0) { if (Convert.ToInt32(ID) > 0) { groups = groups.Where(x => x.Name == Name && x.ID != Convert.ToInt32(ID)); } else { groups = groups.Where(x => x.Name == Name); } if (groups.Count() > 0) { return("false"); } else { return("true"); } } else { return("true"); } }
public ActionResult Add(ProductGroup productGroup) { ResponseMsg response = new ResponseMsg(); ProductGroupLogic.AddProductGroup(productGroup); response.IsSuccess = true; return(Json(response)); }
public DataController(ProductGroupLogic productGroupLogic, ProductLogic productLogic, SupplierLogic supplierLogic, ExportLogic exportLogic, SaleLogic saleLogic) { _productGroupLogic = productGroupLogic; _productLogic = productLogic; _supplierLogic = supplierLogic; _exportLogic = exportLogic; _saleLogic = saleLogic; }
public JsonResult Delete(string ID) { ResponseMsg response = new ResponseMsg(); if (Convert.ToInt32(ID) > 0) { ProductGroupLogic.DeleteProductGroupByID(ID); response.IsSuccess = true; response.ResponseValue = ""; } return(Json(response, JsonRequestBehavior.AllowGet)); }
// // GET: /ProductGroup/ public ActionResult Add(string ID) { ViewBag.ProductGroupTypes = ProductGroupTypeLogic.GetAllProductGroupTypes(); if (Convert.ToInt32(ID) > 0) { var packing = ProductGroupLogic.GetProductGroupByID(Convert.ToInt32(ID)).FirstOrDefault(); return(View(packing)); } else { return(View(new ProductGroup())); } }
public JsonResult GetGroupType(int GroupID) { ResponseMsg response = new ResponseMsg(); if (GroupID > 0) { var group = ProductGroupLogic.GetProductGroupByID(GroupID); if (group != null) { response.IsSuccess = true; response.ResponseValue = group; } } return(Json(response, JsonRequestBehavior.AllowGet)); }
// // GET: /Product/ public ActionResult Add(string ID) { ViewBag.Shades = ShadeLogic.GetShadeByID(0); ViewBag.Packings = PackingLogic.GetPackingByID(0); ViewBag.ProductGroups = ProductGroupLogic.GetProductGroupByID(0); ViewBag.ProductUnits = ProductUnitLogic.GetProductUnitByID(0); ViewBag.Parties = PartyLogic.GetPartyByID(0).Select(x => new { x.ID, x.Name }); ViewBag.RawMaterialTypes = RawMaterialTypeLogic.RawMaterialTypeByID(0); if (Convert.ToInt32(ID) > 0) { var product = ProductLogic.GetProductByID(Convert.ToInt32(ID)).FirstOrDefault(); return(View(product)); } else { return(View(new Product())); } }
public ProductController(ProductLogic productLogic, ProductGroupLogic productGroupLogic) { _productLogic = productLogic; _productGroupLogic = productGroupLogic; }
public OperationRevaluationController(ProductGroupLogic productGroupLogic, ProductLogic productLogic) { _productGroupLogic = productGroupLogic; _productLogic = productLogic; }
public ActionResult GetAll() { return(PartialView("GetAll", ProductGroupLogic.GetProductGroupByID(0))); }
public OperationSalesAnalysisController(ProductGroupLogic productGroupLogic, SaleLogic saleLogic, ProductLogic productLogic) { _productGroupLogic = productGroupLogic; _saleLogic = saleLogic; _productLogic = productLogic; }
public SupplierController(SupplierLogic supplierLogic, ProductGroupLogic productGroupLogic) { _supplierLogic = supplierLogic; _productGroupLogic = productGroupLogic; }