public frmChiTietTraNo(clsBusTraNo trano,frmNoVatTu f)
 {
     InitializeComponent();
     this.f = f;
     try
     {
         this.trano = trano;
         txtMVT.Text = trano.Ma_vat_tu;
         txtTVT.Text = trano.Ten_vat_tu;
         txtChatLuong.Text = trano.Ten_Chat_luong;
         txtSoLuongMuon.Text = trano.soluongmuon.ToString();
         txtKhoHienTai.Text = new clsDM_Kho().get_TenKho(trano.ID_kho);
         txtKhoTraNo.Text = new clsDM_Kho().get_TenKho(trano.ID_kho_muon);
     }
     catch (Exception ex) { MessageBox.Show(Utilities.clsThamSoUtilities.COException(ex)); }
 }
Пример #2
0
        private void btnTraNo_Click(object sender, EventArgs e)
        {
            try
            {
                Int32 selectedRowCount = gridKhoMuonVT.CurrentCell.RowIndex;
                DataGridViewRow SelectedRow = gridKhoMuonVT.Rows[selectedRowCount];
              //  string strMaPhieuNhap = SelectedRow.Cells["Ma_phieu_xuat_tam"].Value.ToString();

                //  clsBusTraNo trano = new clsBusTraNo();
                int idcl = int.Parse(SelectedRow.Cells["id_chat_luong"].Value.ToString());
                int idkho = int.Parse(SelectedRow.Cells["id_kho"].Value.ToString());
                int idKhoMuon = int.Parse(SelectedRow.Cells["id_kho_muon"].Value.ToString());
                string mavt = SelectedRow.Cells["ma_vat_tu"].Value.ToString();
                decimal sl = decimal.Parse(SelectedRow.Cells["so_luong"].Value.ToString());// số lượng nợ
                string maphieu = SelectedRow.Cells["ma_phieu_xuat_tam"].Value.ToString();
                string Ten_chat_luong = SelectedRow.Cells["Ten_chat_luong"].Value.ToString();
                int id = int.Parse(SelectedRow.Cells["ID_kho_muon_vat_tu"].Value.ToString());
                string tenvattu = SelectedRow.Cells["Ten_vat_tu"].Value.ToString();

                //  string tenkho = int.Parse(SelectedRow.Cells["Ten_kho"].Value.ToString());
                clsBusTraNo trano = new clsBusTraNo(mavt, tenvattu, idkho, idKhoMuon, Ten_chat_luong, idcl, sl,maphieu,id);
                frmChiTietTraNo ct = new frmChiTietTraNo(trano,this);

                ct.Show();
                LoadData();
            }
            catch (Exception ex)
            {
                MessageBox.Show(Utilities.clsThamSoUtilities.COException(ex));
            }
        }