Ejemplo n.º 1
0
        public void CheckComboItemIsPass(ComboVM model, EventHandler <RestClientEventArgs <List <string> > > callback)
        {
            string    relativeUrl = "/MKTService/Combo/CheckComboItemIsPass";
            ComboInfo msg         = model.ConvertVM <ComboVM, ComboInfo>();

            msg.CompanyCode = CPApplication.Current.CompanyCode;
            restClient.Create <List <string> >(relativeUrl, msg, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                callback(obj, args);
            });
        }
Ejemplo n.º 2
0
        public void Create(ComboVM model, EventHandler <RestClientEventArgs <int?> > callback)
        {
            string    relativeUrl = "/MKTService/Combo/Create";
            ComboInfo msg         = model.ConvertVM <ComboVM, ComboInfo>();

            msg.Name.Content = model.Name;
            msg.CompanyCode  = CPApplication.Current.CompanyCode;
            restClient.Create <int?>(relativeUrl, msg, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                model.SysNo = args.Result;
                callback(obj, args);
            });
        }
Ejemplo n.º 3
0
        public void Update(ComboVM model, EventHandler <RestClientEventArgs <ComboVM> > callback)
        {
            string    relativeUrl = "/MKTService/Combo/Update";
            ComboInfo msg         = model.ConvertVM <ComboVM, ComboInfo>();

            msg.Name.Content = model.Name;
            restClient.Update <ComboInfo>(relativeUrl, msg, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                var vm = args.Result.Convert <ComboInfo, ComboVM>();
                RestClientEventArgs <ComboVM> e = new RestClientEventArgs <ComboVM>(vm, this.viewPage);
                callback(obj, e);
            });
        }