Exemplo n.º 1
0
 private void gcDetail_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         if (gvDetail.FocusedRowHandle < 0)
         {
             return;
         }
         TraJunction Curr = bsDetail[gvDetail.FocusedRowHandle] as TraJunction;
         if (Curr != null)
         {
             using (FrmJuctionSeg frm = new FrmJuctionSeg(Curr))
             {
                 frm.ShowDialog();
             }
         }
     }
     catch (Exception ex)
     { MsgBox.ShowError(ex.Message); }
 }
Exemplo n.º 2
0
 private void btnNew_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         gvDetail.CloseEditor();
         gvDetail.CloseEditForm();
         gvDetail.FocusedColumn = colID;
         if (bsDetail.Count > 0 && !Valid())
         {
             return;
         }
         TraJunction newItem = new TraJunction();
         newItem.TraJunctionID = bsDetail.Count + 1;
         bsDetail.Add(newItem);
         bsDetail.ResetBindings(false);
         bsDetail.MoveLast();
     }
     catch (Exception ex)
     { MsgBox.ShowError(ex.Message); }
 }
Exemplo n.º 3
0
 public FrmJuctionSeg(TraJunction trajuc)
 {
     InitializeComponent();
     TraInfo = trajuc;
 }