예제 #1
0
        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");
            }
        }
예제 #2
0
        public ActionResult Add(ProductGroup productGroup)
        {
            ResponseMsg response = new ResponseMsg();

            ProductGroupLogic.AddProductGroup(productGroup);
            response.IsSuccess = true;
            return(Json(response));
        }
예제 #3
0
 public DataController(ProductGroupLogic productGroupLogic, ProductLogic productLogic, SupplierLogic supplierLogic, ExportLogic exportLogic, SaleLogic saleLogic)
 {
     _productGroupLogic = productGroupLogic;
     _productLogic      = productLogic;
     _supplierLogic     = supplierLogic;
     _exportLogic       = exportLogic;
     _saleLogic         = saleLogic;
 }
예제 #4
0
        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));
        }
예제 #5
0
        //
        // 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()));
            }
        }
예제 #6
0
        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));
        }
예제 #7
0
        //
        // 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()));
            }
        }
예제 #8
0
 public ProductController(ProductLogic productLogic, ProductGroupLogic productGroupLogic)
 {
     _productLogic      = productLogic;
     _productGroupLogic = productGroupLogic;
 }
 public OperationRevaluationController(ProductGroupLogic productGroupLogic, ProductLogic productLogic)
 {
     _productGroupLogic = productGroupLogic;
     _productLogic      = productLogic;
 }
예제 #10
0
 public ActionResult GetAll()
 {
     return(PartialView("GetAll", ProductGroupLogic.GetProductGroupByID(0)));
 }
예제 #11
0
 public OperationSalesAnalysisController(ProductGroupLogic productGroupLogic, SaleLogic saleLogic, ProductLogic productLogic)
 {
     _productGroupLogic = productGroupLogic;
     _saleLogic         = saleLogic;
     _productLogic      = productLogic;
 }
예제 #12
0
 public SupplierController(SupplierLogic supplierLogic, ProductGroupLogic productGroupLogic)
 {
     _supplierLogic     = supplierLogic;
     _productGroupLogic = productGroupLogic;
 }