예제 #1
0
 private void grdList_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     try
     {
         var          mousePoint = new Point(e.X, e.Y);
         var          element    = grdList.DisplayLayout.UIElement.ElementFromPoint(mousePoint);
         UltraGridRow row        = null;
         row = (UltraGridRow)element.GetContext(typeof(UltraGridRow));
         if (row != null)
         {
             if (row.Index >= 0)
             {
                 using (var frm = new FrmInvoice())
                 {
                     frm.SAInvoiceID = Guid.Parse(row.Cells[ColumnName.RefID].Text);
                     frm.ShowDialog();
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MessageBoxCommon.ShowException(ex);
     }
 }
예제 #2
0
 /// <summary>
 /// Thanh toán thì tạo Hóa đơn
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnPay_Click(object sender, EventArgs e)
 {
     try
     {
         using (var frm = new FrmInvoice())
         {
             frm.FormActionMode = ActionMode.AddNew;
             frm.SAInvoiceID    = OrderID;
             if (frm.ShowDialog() == DialogResult.OK)
             {
                 OrderStatus  = EnumOrderStatus.Done;
                 DialogResult = DialogResult.OK;
             }
         }
     }
     catch (Exception ex)
     {
         MessageBoxCommon.ShowException(ex);
     }
 }