示例#1
0
 private void btnAddSupplier_Click(object sender, EventArgs e)
 {
     try
     {
         frmSupplierEdit frmCar = new frmSupplierEdit(0);
         LBShowForm.ShowDialog(frmCar);
     }
     catch (Exception ex)
     {
         LB.WinFunction.LBCommonHelper.DealWithErrorMessage(ex);
     }
 }
示例#2
0
        private void GrdMain_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
                {
                    DataRowView drvSelect   = this.grdMain.Rows[e.RowIndex].DataBoundItem as DataRowView;
                    long        lSupplierID = drvSelect["SupplierID"] == DBNull.Value ?
                                              0 : Convert.ToInt64(drvSelect["SupplierID"]);
                    if (lSupplierID > 0)
                    {
                        frmSupplierEdit frmCar = new frmSupplierEdit(lSupplierID);
                        LBShowForm.ShowDialog(frmCar);

                        LoadDataSource();
                    }
                }
            }
            catch (Exception ex)
            {
                LB.WinFunction.LBCommonHelper.DealWithErrorMessage(ex);
            }
        }