Exemplo n.º 1
0
        public void FireNewEntity()
        {
            if (ReadOnly)
            {
                return;
            }

            Domain.WGR entity  = new Domain.WGR();
            FormWgrAdd formWGR = new FormWgrAdd();

            formWGR.WGR = entity;
            if (formWGR.ShowDialog() == DialogResult.OK)
            {
                _bindingEntities.Add(formWGR.WGR);
            }
        }
Exemplo n.º 2
0
 public void FireEditEntity(Domain.WGR wgr)
 {
     if (ReadOnly)
     {
         return;
     }
     Domain.WGR entity = wgr;
     if (entity == null)
     {
         entity = FocusedEntity;
     }
     if (entity != null)
     {
         FormWgrAdd formWGR = new FormWgrAdd();
         formWGR.WGR = entity;
         if (formWGR.ShowDialog() == DialogResult.OK)
         {
             _bindingEntities.SetEntity(formWGR.WGR);
         }
     }
 }