Beispiel #1
0
 private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0)
     {
         PurchaseItemRecord record = dataGridView1.Rows[e.RowIndex].Tag as PurchaseItemRecord;
         if (dataGridView1.Columns[e.ColumnIndex].Name == "colSheetNo")
         {
             PurchaseOrder sheet = (new PurchaseOrderBLL(AppSettings.Current.ConnStr)).GetByID(record.SheetNo).QueryObject;
             if (sheet != null)
             {
                 FrmPurchaseOrderDetail frm = new FrmPurchaseOrderDetail();
                 frm.IsAdding     = false;
                 frm.UpdatingItem = sheet;
                 frm.IsForView    = true;
                 frm.ShowDialog();
             }
         }
         else if (dataGridView1.Columns[e.ColumnIndex].Name == "colReceived")
         {
             ProductInventoryItemSearchCondition con = new ProductInventoryItemSearchCondition();
             con.PurchaseItem = record.ID;
             FrmProductInventoryItemView frm = new FrmProductInventoryItemView();
             frm.SearchCondition = con;
             frm.ShowDialog();
         }
     }
 }
Beispiel #2
0
        protected override FrmDetailBase GetDetailForm()
        {
            FrmPurchaseOrderDetail frm = new FrmPurchaseOrderDetail();

            if (supplierTree1.SelectedNode != null)
            {
                frm.Supplier = supplierTree1.SelectedNode.Tag as CompanyInfo;
            }
            return(frm);
        }