示例#1
0
        public IHttpActionResult Update(ProductCategoryMaster ProductCategoryMaster)
        {
            var isupdate = _ProductCategoryMasterRepository.Update(ProductCategoryMaster);

            if (isupdate == true)
            {
                return(Ok(isupdate));
            }
            return(BadRequest());
        }
示例#2
0
        public IHttpActionResult CreateProductCategoryMaster(ProductCategoryMaster productCategoryMaster)
        {
            var isSave = _ProductCategoryMasterRepository.CreateProductCategoryMaster(productCategoryMaster);

            if (isSave == true)
            {
                return(Ok(isSave));
            }
            return(BadRequest());
        }
        public bool Update(ProductCategoryMaster ProductCategoryMaster)
        {
            ProductCategoryMaster.CreatedDate  = now;
            ProductCategoryMaster.ModifiedDate = now;
            int rowsAffected = this._db.Execute(
                "UPDATE ProductCategoryMaster SET Name = @Name ,Description = @Description,@IsActive =1,@CreatedBy = 1,CreatedDate =ProductCategoryMaster.CreatedDate, @ModifiedBy = 1,ModifiedDate = ProductCategoryMaster.ModifiedDate,Prod_Grp_Id = @Prod_Grp_Id WHERE ID = " +
                ProductCategoryMaster.Id, ProductCategoryMaster);

            if (rowsAffected > 0)
            {
                return(true);
            }

            return(false);
        }
        public bool CreateProductCategoryMaster(ProductCategoryMaster ProductCategoryMaster)
        {
            ProductCategoryMaster.CreatedDate  = now;
            ProductCategoryMaster.ModifiedDate = now;

            int rowsAffected = this._db.Execute(@"INSERT ProductCategoryMaster(Name,Description,IsActive,CreatedBy,CreatedDate,ModifiedBy,ModifiedDate,Prod_Grp_Id) 
                                            values (@Name, @Description,1,1,@CreatedDate,1,@ModifiedDate,@Prod_Grp_Id)",
                                                new { Name = ProductCategoryMaster.Name, Description = ProductCategoryMaster.Description, IsActive = 1, CreatedBy = 1, CreatedDate = ProductCategoryMaster.CreatedDate, ModifiedBy = 1, ModifiedDate = ProductCategoryMaster.ModifiedDate, Prod_Grp_Id = ProductCategoryMaster.Prod_Grp_Id });

            if (rowsAffected > 0)
            {
                return(true);
            }

            return(false);
        }
示例#5
0
 public ProductCategoryMaster GetProductCategory(ProductCategoryMaster item)
 {
     return((ProductCategoryMaster)productcategoryDAL.GetItem <ProductCategoryMaster>(item));
 }
示例#6
0
 public bool DeleteProduct(ProductCategoryMaster item)
 {
     return(productcategoryDAL.Delete(item));
 }
示例#7
0
 public bool SaveProduct(ProductCategoryMaster newItem)
 {
     return(productcategoryDAL.Save(newItem));
 }