Exemplo n.º 1
0
        public void CreateCategoryRelated(CategoryRelatedVM model, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            CategoryRelatedInfo info = new CategoryRelatedInfo();

            info.C3SysNo1        = Convert.ToInt32(model.C3SysNo1);
            info.C3SysNo2        = Convert.ToInt32(model.C3SysNo2);
            info.CreateUserSysNo = model.CreateUserSysNo;
            info.Priority        = Convert.ToInt32(model.Priority);
            info.CompanyCode     = CPApplication.Current.CompanyCode;
            info.LanguageCode    = CPApplication.Current.LanguageCode;
            restClient.Create(CreateCategoryRelatedUrl, info, callback);
        }
        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            if (!ValidationManager.Validate(this))
            {
                return;
            }
            CategoryRelatedVM model = this.DataContext as CategoryRelatedVM;

            facade.CreateCategoryRelated(model, (obj, arg) =>
            {
                if (arg.FaultsHandle())
                {
                    return;
                }
                CloseDialog(DialogResultType.OK);
                CPApplication.Current.CurrentPage.Context.Window.Alert(ResPropertyMaintain.Info_SaveSuccessfully);
            });
        }