Пример #1
0
        protected void OnButtonAddEnumItemClicked(object sender, QS.Widgets.EnumItemClickedEventArgs e)
        {
            ProxyDocumentType type = (ProxyDocumentType)e.ItemEnum;
            var dlg = OrmMain.CreateObjectDialog(ProxyDocument.GetProxyDocumentClass(type));

            dlg.EntitySaved += Dlg_EntitySaved;
            TabParent.AddSlaveTab(this, dlg);
        }
Пример #2
0
        protected void OnButtonDeleteClicked(object sender, EventArgs e)
        {
            var item = tableDocuments.GetSelectedObject <ProxyDocumentsVMNode>();

            if (OrmMain.DeleteObject(ProxyDocument.GetProxyDocumentClass(item.Type), item.Id))
            {
                tableDocuments.RepresentationModel.UpdateNodes();
            }
        }
Пример #3
0
 protected void OnButtonEditClicked(object sender, EventArgs e)
 {
     if (tableDocuments.GetSelectedObjects().GetLength(0) > 0)
     {
         int id = (tableDocuments.GetSelectedObjects()[0] as ProxyDocumentsVMNode).Id;
         ProxyDocumentType type = (tableDocuments.GetSelectedObjects()[0] as ProxyDocumentsVMNode).Type;
         var dlg = OrmMain.CreateObjectDialog(ProxyDocument.GetProxyDocumentClass(type), id);
         dlg.EntitySaved += Dlg_EntitySaved;
         TabParent.AddSlaveTab(this, dlg);
     }
 }