private void ConfirmSelect() { int stokbrg = Convert.ToInt32(Tools.isNull(CGBarang.SelectedCells[0].OwningRow.Cells["StokBarang"].Value, 0)); if (stokbrg <= 0) { MessageBox.Show("Stok Barang Kosong"); return; } //else //{ idbarangpilih = CGBarang.SelectedCells[0].OwningRow.Cells["IdBarang"].Value.ToString(); int stok = Convert.ToInt32(CGBarang.SelectedCells[0].OwningRow.Cells["StokBarang"].Value); if (this.Caller is DO.FrmDO2803) { DO.FrmDO2803 frmCaller = (DO.FrmDO2803) this.Caller; frmCaller.TxtBarcode.Text = idbarangpilih; frmCaller.AmbilBarang2(); } else { DO.FrmDO frmCaller = (DO.FrmDO) this.Caller; frmCaller.TxtBarcode.Text = idbarangpilih; frmCaller.AmbilBarang2(stok); } //} this.Close(); }
private void ConfirmSelect() { int stokbrg = Convert.ToInt32(CGBarang.SelectedCells[0].OwningRow.Cells["StokBarang"].Value); //if (stokbrg <= 0) //{ // return; //} //else //{ idbarangpilih = CGBarang.SelectedCells[0].OwningRow.Cells["IdBarang"].Value.ToString(); int stok = Convert.ToInt32(CGBarang.SelectedCells[0].OwningRow.Cells["StokBarang"].Value); if (this.Caller is DO.FrmDO2803) { DO.FrmDO2803 frmCaller = (DO.FrmDO2803) this.Caller; frmCaller.TxtBarcode.Text = idbarangpilih; frmCaller.AmbilBarang2(); } else if (this.Caller is DO.FrmDO2828) { DO.FrmDO2828 frmCaller = (DO.FrmDO2828) this.Caller; frmCaller.TxtBarcode.Text = idbarangpilih; frmCaller.AmbilBarang2(); } else { DO.FrmDO frmCaller = (DO.FrmDO) this.Caller; frmCaller.TxtBarcode.Text = idbarangpilih; frmCaller.AmbilBarang2(); } //} this.Close(); }