Exemplo n.º 1
0
        public ActionResult Index()
        {
            base.SetDisplayBtn();
            base.SetCreateBtn();
            base.SetEditBtn();
            base.SetDeleteBtn();

            var model = new PROD_MASTERModel();

            return(View(model));
        }
Exemplo n.º 2
0
 public ActionResult Create(PROD_MASTERModel model)
 {
     if (ModelState.IsValid)
     {
         this.CreateBaseData <PROD_MASTERModel>(model);
         OperationResult result = PROD_MASTERService.Insert(model);
         if (result.ResultType == OperationResultType.Success)
         {
             return(Json(result));
         }
         else
         {
             return(PartialView(model));
         }
     }
     else
     {
         return(PartialView(model));
     }
 }
Exemplo n.º 3
0
        public OperationResult Insert(PROD_MASTERModel model)
        {
            var entity = new PROD_MASTER
            {
                ID                 = model.ID,
                ProductNo          = model.ProductNo,
                ProductName        = model.ProductName,
                Description        = model.Description,
                ProductType        = model.ProductType,
                StndCost           = model.StndCost,
                CurrCost           = model.CurrCost,
                ListPrice          = model.ListPrice,
                SpecialPrice       = model.SpecialPrice,
                ClearPrice         = model.ClearPrice,
                ProdCategoryID     = model.ProdCategoryID,
                CategoryCode       = model.CategoryCode,
                SchdlUOM           = model.SchdlUOM,
                PriceShed          = model.PriceShed,
                BaseUOFM           = model.BaseUOFM,
                AvailableQTY       = model.AvailableQTY,
                ProdGroupID        = model.ProdGroupID,
                ProdSubclassID     = model.ProdSubclassID,
                LeadTime           = model.LeadTime,
                QtySales           = model.QtySales,
                QtyMin             = model.QtyMin,
                QtyMax             = model.QtyMax,
                CustomerID         = model.CustomerID,
                StockType          = model.StockType,
                SalesRepID         = model.SalesRepID,
                PriceBookItem      = model.PriceBookItem,
                PriceLevel         = model.PriceLevel,
                BarCode            = model.BarCode,
                Ranking            = model.Ranking,
                Notes              = model.Notes,
                Substitute1        = model.Substitute1,
                Substitute2        = model.Substitute2,
                Qty1               = model.Qty1,
                Qty3               = model.Qty3,
                Qty6               = model.Qty6,
                Qty12              = model.Qty12,
                Sales1             = model.Sales1,
                Sales3             = model.Sales3,
                Sales6             = model.Sales6,
                Sales12            = model.Sales12,
                GPD1               = model.GPD1,
                GPD3               = model.GPD3,
                GPD6               = model.GPD6,
                GPD12              = model.GPD12,
                LastDate           = model.LastDate,
                CreateDate         = model.CreateDate,
                Creator            = model.Creator,
                Modifier           = model.Modifier,
                ModiDate           = model.ModiDate,
                Status             = model.Status,
                P01                = model.P01,
                P02                = model.P02,
                P03                = model.P03,
                P04                = model.P04,
                P05                = model.P05,
                P06                = model.P06,
                P07                = model.P07,
                P08                = model.P08,
                P09                = model.P09,
                P10                = model.P10,
                IsCommend          = model.IsCommend,
                IsHot              = model.IsHot,
                ExteriorPart       = model.ExteriorPart,
                ExteriorPartPrice  = model.ExteriorPartPrice,
                ViewTimes          = model.ViewTimes,
                SmallPic           = model.SmallPic,
                BigPic             = model.BigPic,
                LocationStocks1    = model.LocationStocks1,
                LocationStocks2    = model.LocationStocks2,
                LocationStocks3    = model.LocationStocks3,
                LocationStocks4    = model.LocationStocks4,
                LocationStocks5    = model.LocationStocks5,
                LocationStocks6    = model.LocationStocks6,
                LocationStocks7    = model.LocationStocks7,
                LocationStocks8    = model.LocationStocks8,
                LocationStocks9    = model.LocationStocks9,
                LocationStocks10   = model.LocationStocks10,
                LocationStocks11   = model.LocationStocks11,
                LocationStocks12   = model.LocationStocks12,
                LocationStocks13   = model.LocationStocks13,
                LocationStocks14   = model.LocationStocks14,
                LocationStocks15   = model.LocationStocks15,
                LocationAllocate1  = model.LocationAllocate1,
                LocationAllocate2  = model.LocationAllocate2,
                LocationAllocate3  = model.LocationAllocate3,
                LocationAllocate4  = model.LocationAllocate4,
                LocationAllocate5  = model.LocationAllocate5,
                LocationAllocate6  = model.LocationAllocate6,
                LocationAllocate7  = model.LocationAllocate7,
                LocationAllocate8  = model.LocationAllocate8,
                LocationAllocate9  = model.LocationAllocate9,
                LocationAllocate10 = model.LocationAllocate10,
                LocationAllocate11 = model.LocationAllocate11,
                LocationAllocate12 = model.LocationAllocate12,
                LocationAllocate13 = model.LocationAllocate13,
                LocationAllocate14 = model.LocationAllocate14,
                LocationAllocate15 = model.LocationAllocate15,
                Introduction       = model.Introduction,
                Brand              = model.Brand,
                Item01             = model.Item01,
                Item02             = model.Item02,
                Item03             = model.Item03,
                Item04             = model.Item04,
                Item05             = model.Item05,
            };

            PROD_MASTERRepository.Insert(entity);
            return(new OperationResult(OperationResultType.Success, "Added successfully"));
        }
Exemplo n.º 4
0
        public ActionResult Display(string Id)
        {
            var model  = new PROD_MASTERModel();
            var entity = PROD_MASTERService.PROD_MASTERList.FirstOrDefault(t => t.ID == Id);

            if (null != entity)
            {
                model = new PROD_MASTERModel
                {
                    ID                 = entity.ID,
                    ProductNo          = entity.ProductNo,
                    ProductName        = entity.ProductName,
                    Description        = entity.Description,
                    ProductType        = entity.ProductType,
                    StndCost           = entity.StndCost,
                    CurrCost           = entity.CurrCost,
                    ListPrice          = entity.ListPrice,
                    SpecialPrice       = entity.SpecialPrice,
                    ClearPrice         = entity.ClearPrice,
                    ProdCategoryID     = entity.ProdCategoryID,
                    CategoryCode       = entity.CategoryCode,
                    SchdlUOM           = entity.SchdlUOM,
                    PriceShed          = entity.PriceShed,
                    BaseUOFM           = entity.BaseUOFM,
                    AvailableQTY       = entity.AvailableQTY,
                    ProdGroupID        = entity.ProdGroupID,
                    ProdSubclassID     = entity.ProdSubclassID,
                    LeadTime           = entity.LeadTime,
                    QtySales           = entity.QtySales,
                    QtyMin             = entity.QtyMin,
                    QtyMax             = entity.QtyMax,
                    CustomerID         = entity.CustomerID,
                    StockType          = entity.StockType,
                    SalesRepID         = entity.SalesRepID,
                    PriceBookItem      = entity.PriceBookItem,
                    PriceLevel         = entity.PriceLevel,
                    BarCode            = entity.BarCode,
                    Ranking            = entity.Ranking,
                    Notes              = entity.Notes,
                    Substitute1        = entity.Substitute1,
                    Substitute2        = entity.Substitute2,
                    Qty1               = entity.Qty1,
                    Qty3               = entity.Qty3,
                    Qty6               = entity.Qty6,
                    Qty12              = entity.Qty12,
                    Sales1             = entity.Sales1,
                    Sales3             = entity.Sales3,
                    Sales6             = entity.Sales6,
                    Sales12            = entity.Sales12,
                    GPD1               = entity.GPD1,
                    GPD3               = entity.GPD3,
                    GPD6               = entity.GPD6,
                    GPD12              = entity.GPD12,
                    LastDate           = entity.LastDate,
                    CreateDate         = entity.CreateDate,
                    Creator            = entity.Creator,
                    Modifier           = entity.Modifier,
                    ModiDate           = entity.ModiDate,
                    Status             = entity.Status,
                    P01                = entity.P01,
                    P02                = entity.P02,
                    P03                = entity.P03,
                    P04                = entity.P04,
                    P05                = entity.P05,
                    P06                = entity.P06,
                    P07                = entity.P07,
                    P08                = entity.P08,
                    P09                = entity.P09,
                    P10                = entity.P10,
                    IsCommend          = entity.IsCommend,
                    IsHot              = entity.IsHot,
                    ExteriorPart       = entity.ExteriorPart,
                    ExteriorPartPrice  = entity.ExteriorPartPrice,
                    ViewTimes          = entity.ViewTimes,
                    SmallPic           = entity.SmallPic,
                    BigPic             = entity.BigPic,
                    LocationStocks1    = entity.LocationStocks1,
                    LocationStocks2    = entity.LocationStocks2,
                    LocationStocks3    = entity.LocationStocks3,
                    LocationStocks4    = entity.LocationStocks4,
                    LocationStocks5    = entity.LocationStocks5,
                    LocationStocks6    = entity.LocationStocks6,
                    LocationStocks7    = entity.LocationStocks7,
                    LocationStocks8    = entity.LocationStocks8,
                    LocationStocks9    = entity.LocationStocks9,
                    LocationStocks10   = entity.LocationStocks10,
                    LocationStocks11   = entity.LocationStocks11,
                    LocationStocks12   = entity.LocationStocks12,
                    LocationStocks13   = entity.LocationStocks13,
                    LocationStocks14   = entity.LocationStocks14,
                    LocationStocks15   = entity.LocationStocks15,
                    LocationAllocate1  = entity.LocationAllocate1,
                    LocationAllocate2  = entity.LocationAllocate2,
                    LocationAllocate3  = entity.LocationAllocate3,
                    LocationAllocate4  = entity.LocationAllocate4,
                    LocationAllocate5  = entity.LocationAllocate5,
                    LocationAllocate6  = entity.LocationAllocate6,
                    LocationAllocate7  = entity.LocationAllocate7,
                    LocationAllocate8  = entity.LocationAllocate8,
                    LocationAllocate9  = entity.LocationAllocate9,
                    LocationAllocate10 = entity.LocationAllocate10,
                    LocationAllocate11 = entity.LocationAllocate11,
                    LocationAllocate12 = entity.LocationAllocate12,
                    LocationAllocate13 = entity.LocationAllocate13,
                    LocationAllocate14 = entity.LocationAllocate14,
                    LocationAllocate15 = entity.LocationAllocate15,
                    Introduction       = entity.Introduction,
                    Brand              = entity.Brand,
                    Item01             = entity.Item01,
                    Item02             = entity.Item02,
                    Item03             = entity.Item03,
                    Item04             = entity.Item04,
                    Item05             = entity.Item05,
                };
            }
            return(View(model));
        }
Exemplo n.º 5
0
        public ActionResult Create()
        {
            var model = new PROD_MASTERModel();

            return(PartialView(model));
        }