private void btnSaveAsJson_Click(object sender, EventArgs e) { var ns = lblNamespace.Text.Trim(); var com = new RepositoryAsJsonCommand(new AdminRepository(), ns); com.Execute(); }
protected void Submit() { Repository.Add(Object); isSaved = true; // Save json var cmd = new RepositoryAsJsonCommand(Repository, $"SIM.Aibel.{Mediator.Context}"); cmd.Execute(); }
protected void DeleteRow(DataRow row) { var instance = row.ItemArray[0]; var backingPropVal = BackingProprty.GetValue(Owner); backingPropVal.GetType().GetMethod("Remove", new[] { instance.GetType() }).Invoke(backingPropVal, new[] { instance }); // Save json var cmd = new RepositoryAsJsonCommand(Repository, $"SIM.Aibel.{Mediator.Context}"); cmd.Execute(); }
protected void Create() { if (Scope == "Properties") { CreateProperty(); } else { CreateAttribute(); } Close(); // Update json var cmd = new RepositoryAsJsonCommand(Repository, (Owner as DynamicObject).Namespace); cmd.Execute(); }