public void Create(ECDynamicCategoryVM vm, EventHandler <RestClientEventArgs <ECDynamicCategory> > callback) { var entity = vm.ConvertVM <ECDynamicCategoryVM, ECDynamicCategory>(); entity.CompanyCode = CPApplication.Current.CompanyCode; string relativeUrl = "/MKTService/ECDynamicCategory/Create"; restClient.Create(relativeUrl, entity, callback); }
public void Update(ECDynamicCategoryVM vm, EventHandler <RestClientEventArgs <object> > callback) { var entity = vm.ConvertVM <ECDynamicCategoryVM, ECDynamicCategory>(); entity.Status = vm.IsActive ? DynamicCategoryStatus.Active : DynamicCategoryStatus.Deactive; entity.CompanyCode = CPApplication.Current.CompanyCode; string relativeUrl = "/MKTService/ECDynamicCategory/Update"; restClient.Update(relativeUrl, entity, callback); }