예제 #1
0
 private void updateReturned()
 {
     for (int i = 0; i < itemsDataGrid.Rows.Count; i++)
     {
         DeliveryOrderItem st = (DeliveryOrderItem)itemsDataGrid.Rows[i].Tag;
         if (st == null)
         {
             continue;
         }
         Part p = (Part)itemsDataGrid[codeColumn.Index, i].Tag;
         if (itemsDataGrid[unitColumn.Index, i].Value == null)
         {
             continue;
         }
         p.UNIT = (Unit)r_unit.GetById(p.UNIT);
         itemsDataGrid[returnedColumn.Index, i].Value     = r_grn.GetReturned(st.ID);
         itemsDataGrid[returnedunitColumn.Index, i].Value = p.UNIT.ToString();
     }
 }
예제 #2
0
 void Post(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         if (m_prn.POSTED)
         {
             r_prn.Revise(m_prn.ID);
             m_prn.POSTED = false;
             KryptonMessageBox.Show("Transaction has been UNPOSTED", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             r_prn.Confirm(m_prn.ID);
             m_prn.POSTED = true;
             KryptonMessageBox.Show("Transaction has been POSTED", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         setEnableForm(false);
         setEditMode(EditMode.View);
         for (int i = 0; i < itemsDataGrid.Rows.Count; i++)
         {
             DeliveryOrderItem poi = (DeliveryOrderItem)itemsDataGrid[scanColumn.Index, i].Tag;
             if (poi == null)
             {
                 continue;
             }
             itemsDataGrid[OutstandingPOColumn.Index, i].Value = r_grn.GetReturned(poi.ID);
         }
     }
     catch (Exception x)
     {
         KryptonMessageBox.Show(x.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }