Exemplo n.º 1
0
 private void ts_Edit_Click(object sender, EventArgs e)
 {
     if (CanEditMinMaxPersons())
     {
         using (FormWorldMinMaxEdit form = new FormWorldMinMaxEdit())
         {
             form.Entity = context;
             if (form.ShowDialog() == DialogResult.OK)
             {
                 if (gridControl.DataSource != null)
                 {
                     BindingList <PersonMinMax> lst = (BindingList <PersonMinMax>)gridControl.DataSource;
                     lst.ResetBindings();
                     UpdateButtonState();
                 }
             }
         }
     }
 }
Exemplo n.º 2
0
 private void ts_AddNew_Click(object sender, EventArgs e)
 {
     using (FormWorldMinMaxEdit form = new FormWorldMinMaxEdit())
     {
         context.TakePersonMinMax.CreateNewPerson((long)edWorld.EditValue);
         form.Entity = context;
         if (form.ShowDialog() == DialogResult.OK)
         {
             context.TakePersonMinMax.AddPerson();
             if (gridControl.DataSource != null)
             {
                 BindingList <PersonMinMax> lst = (BindingList <PersonMinMax>)gridControl.DataSource;
                 lst.Add(context.TakePersonMinMax.PersonMinMax);
                 context.TakePersonMinMax.PersonMinMax = FocusedEntity;
             }
             UpdateButtonState();
         }
         else
         {
             context.TakePersonMinMax.PersonMinMax = FocusedEntity;
         }
     }
 }
Exemplo n.º 3
0
 private void ts_Edit_Click(object sender, EventArgs e)
 {
     if (CanEditMinMaxPersons())
     {
         using (FormWorldMinMaxEdit form = new FormWorldMinMaxEdit())
         {
             form.Entity = context;
             if (form.ShowDialog() == DialogResult.OK)
             {
                 if (gridControl.DataSource != null)
                 {
                     BindingList<PersonMinMax> lst = (BindingList<PersonMinMax>)gridControl.DataSource;
                     lst.ResetBindings();
                     UpdateButtonState();
                 }
             }
             
         }
     }
 }
Exemplo n.º 4
0
 private void ts_AddNew_Click(object sender, EventArgs e)
 {
     using (FormWorldMinMaxEdit form = new FormWorldMinMaxEdit())
     {
         context.TakePersonMinMax.CreateNewPerson ((long)edWorld.EditValue);
         form.Entity = context;
         if (form.ShowDialog() == DialogResult.OK)
         {
             context.TakePersonMinMax.AddPerson();
             if (gridControl.DataSource != null)
             {
                 BindingList<PersonMinMax> lst = (BindingList<PersonMinMax>)gridControl.DataSource;
                 lst.Add(context.TakePersonMinMax.PersonMinMax);
                 context.TakePersonMinMax.PersonMinMax = FocusedEntity;
             }
             UpdateButtonState();
         }
         else
         {
             context.TakePersonMinMax.PersonMinMax = FocusedEntity;
         }
     }
     
 }