예제 #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();
                 }
             }
         }
     }
 }
예제 #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;
         }
     }
 }
예제 #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();
                 }
             }
             
         }
     }
 }
예제 #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;
         }
     }
     
 }