Exemplo n.º 1
0
 private void btnReportReceive_Click(object sender, EventArgs e)
 {
     DialogResult dlg = MessageBox.Show("ต้องการแสดงรายงานหรือไม่ !!!", "ผลการทำงาน", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
     if (dlg == DialogResult.OK)
     {
     receive.rptReceiveSelect rptReceiveSelect = new rptReceiveSelect();
     rptReceiveSelect.StartPosition = FormStartPosition.CenterScreen;   // กำหนด frm ย่อย ให้อยู่ตรงกลาง
     rptReceiveSelect.setReceiveId = Convert.ToInt16(RecId);
     rptReceiveSelect.setReceiveType = ReceiveType;
     rptReceiveSelect.ShowDialog();
     GetData();
     }
 }
Exemplo n.º 2
0
 private void รายงานใบรบแสดงราคาToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (dgvHead.Rows.Count <= 0) { MessageBox.Show("กรุณาเลือกใบรับ"); return; }
     if (dgvHead.CurrentRow.Cells[6].Value.ToString() + "" == "")
     {
         if (dgvHead.CurrentRow.Cells[20].Value.ToString() + "" != "-")
         {
             receive.receiveReport rpt = new receive.receiveReport(DataDepPrice(), 1,0);
             rpt.ShowDialog();
         }
         else
         {
             StockAsiaDrink.rptReceiveOutside frm = new StockAsiaDrink.rptReceiveOutside();
             frm.setId = Convert.ToInt16(dgvHead.CurrentRow.Cells[0].Value.ToString());
             frm.ShowDialog();
         }
     }
     else
     {
         if (dgvHead.CurrentRow.Cells[20].Value.ToString() + "" != "-")
         {
             receive.receiveReport rpt = new receive.receiveReport(DataPrice(), 0,0);
             rpt.ShowDialog();
         }
         else
         {
             receive.rptReceiveSelect rptReceiveSelect = new rptReceiveSelect();
             rptReceiveSelect.StartPosition = FormStartPosition.CenterScreen;   // กำหนด frm ย่อย ให้อยู่ตรงกลาง
             rptReceiveSelect.setReceiveId = Convert.ToInt16(dgvHead.CurrentRow.Cells[0].Value.ToString());
             rptReceiveSelect.setReceiveType = dgvHead.CurrentRow.Cells[11].Value.ToString();
             rptReceiveSelect.ShowDialog();
         }
     }
 }