public int updateWoodProp(WoodProp prop) { using (PetaPoco.Database context = new PetaPoco.Database("DefaultConnection")) { return((int)context.Update(prop)); } }
public int addWoodProp(int id, int ac) { WoodProp woodProp = new WoodProp(); woodProp = Services.ProductServices.GetInstance.GetWoodPropByID(id); woodProp.Price = ac; woodProp.PriceUpdatedOn = DateTime.Now; Services.ProductServices.GetInstance.updateWoodProp(woodProp); return(0); }