示例#1
0
        private void cmdEdit_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedCells.Count == 0)
            {
                MessageBox.Show(Messages.Error.RowNotSelected);
                return;
            }
            //if (dataGridView1.SelectedCells[0].OwningRow.Cells["TglKoreksi"].Value.ToString().Trim() != String.Empty)
            //{
            //    MessageBox.Show("Sudah ada TglKoreksi");
            //    return;
            //}

            if (dataGridView1.SelectedCells[0].OwningRow.Cells["TglTerima"].Value.ToString().Trim() == String.Empty)
            {
                MessageBox.Show("Belum Ada Tgl Terima");
                return;
            }
            int kor = 0, not = 0;

            kor = Convert.ToInt32(dataGridView1.SelectedCells[0].OwningRow.Cells["QtyNota"].Value);
            not = Convert.ToInt32(dataGridView1.SelectedCells[0].OwningRow.Cells["QtySuratJalan"].Value);
            if (kor != not & dataGridView1.SelectedCells[0].OwningRow.Cells["TglKoreksi"].Value.ToString().Trim() != String.Empty)
            {
                MessageBox.Show("Sudah Ada Koreksi Qty");
                return;
            }

            Guid KoreksiID = (Guid)dataGridView1.SelectedCells[0].OwningRow.Cells["RowID"].Value;

            Pembelian.frmKoreksiBeliUpdate ifrmChild = new Pembelian.frmKoreksiBeliUpdate(this, _notaBeliDetailID, KoreksiID);
            ifrmChild.MdiParent = Program.MainForm;
            Program.MainForm.RegisterChild(ifrmChild);
            ifrmChild.Show();
        }
示例#2
0
 private void cmdAdd_Click(object sender, EventArgs e)
 {
     if (dataGridView1.RowCount != 0)
     {
         MessageBox.Show("Sudah ada koreksi," + System.Environment.NewLine
                         + "tidak bisa buat koreksi lagi!");
         return;
     }
     Pembelian.frmKoreksiBeliUpdate ifrmChild = new Pembelian.frmKoreksiBeliUpdate(this, _notaBeliDetailID);
     ifrmChild.MdiParent = Program.MainForm;
     Program.MainForm.RegisterChild(ifrmChild);
     ifrmChild.Show();
 }