Example #1
0
        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);
        }
Example #2
0
        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);
        }