Ejemplo n.º 1
0
 private void btnViewDetail_Click(object sender, EventArgs e)
 {
     try
     {
         gvPassLandToAction.CloseEditor();
         IOActionInfo CurrIOAction = bsIOActions.Current as IOActionInfo;
         if (CurrIOAction != null)
         {
             using (FrmIOActionSet frm = new FrmIOActionSet(CurrIOAction, true))
             {
                 frm.ShowDialog();
             }
         }
     }
     catch (Exception ex)
     { MsgBox.ShowError(ex.Message); }
 }
Ejemplo n.º 2
0
 private void btnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         int          actionID      = this.bsDetail.Count + 1;
         IOActionInfo NewActionInfo = new IOActionInfo();
         NewActionInfo.ActionID = actionID;
         using (FrmIOActionSet frm = new FrmIOActionSet(NewActionInfo, false))
         {
             frm.ShowDialog();
             if (frm.DialogResult == DialogResult.OK)
             {
                 bsDetail.DataSource = AGVDAccess.AGVClientDAccess.LoadAllIOAction();
                 bsDetail.ResetBindings(false);
             }
         }
     }
     catch (Exception ex)
     { MsgBox.ShowError(ex.Message); }
 }
Ejemplo n.º 3
0
 private void btnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         IList <IOActionInfo> AllAction     = bsDetail.List as IList <IOActionInfo>;
         IOActionInfo         NewActionInfo = bsDetail.Current as IOActionInfo;
         if (NewActionInfo != null)
         {
             NewActionInfo.IsNew = false;
             using (FrmIOActionSet frm = new FrmIOActionSet(NewActionInfo, false))
             {
                 frm.ShowDialog();
                 if (frm.DialogResult == DialogResult.OK)
                 {
                     bsDetail.DataSource = AGVDAccess.AGVClientDAccess.LoadAllIOAction();
                     bsDetail.ResetBindings(false);
                 }
             }
         }
     }
     catch (Exception ex)
     { MsgBox.ShowError(ex.Message); }
 }