/// <summary> /// hungvv =================do du lieu vao txt=========================== /// </summary> /// <param name="dat"></param> private void DoDuLieu(Entities.HoaDonNhap dat) { Common.Utilities com = new Common.Utilities(); txtSodonhang.Text = dat.MaHoaDonNhap; txtManhacungcap.Text = dat.MaNhaCungCap; GiaTriCanLuu.Ma = dat.MaNhaCungCap; makNgaydonhang.Text = com.XuLy(2, dat.NgayNhap.ToString()); makHanthanhtoan.Text = com.XuLy(2, dat.HanThanhToan.ToString()); txtNohienthoi.Text = dat.NoHienThoi.ToString(); txtnguoigiaohang.Text = dat.NguoiGiaoHang; cbxHinhthucthanhtoan.SelectedItem = dat.HinhThucThanhToan; cbxKhoHang.SelectedValue = dat.MaKho; cbxDieuKienThanhToan.SelectedItem = dat.DieuKienThanhToan; txtMadondathang.Text = dat.MaDonDatHang; cbxTienTe_TyGia.SelectedValue = dat.MaTienTe; txtChietkhau.Text = dat.ChietKhau.ToString(); txtThanhtoanngay.Text = dat.ThanhToanNgay.ToString(); txtGiatrigiatang.Text = dat.ThueGTGT.ToString(); txtTongtien.Text = dat.TongTien.ToString(); txtDiengiai.Text = dat.GhiChu; //HienThi_ChiTiet_HoaDonNhap(); }
/// <summary> /// hungvv =================do du lieu vao txt=========================== /// </summary> /// <param name="dat"></param> private void DoDuLieu(Entities.DonDatHang dat) { Common.Utilities com = new Common.Utilities(); txtSodonhang.Text = dat.MaDonDatHang; txtManhacungcap.Text = dat.MaNhaCungCap; GiaTriCanLuu.Ma = dat.MaNhaCungCap; txtTrangthaidonhang.Text = dat.TrangThaiDonDatHang; cbxDieukienthanhtoan.SelectedValue = dat.DieuKienThanhToan; cbxMaKho.Text = dat.MaKho; makNgaydonhang.Text = com.XuLy(2, this.dathang.NgayDonHang.ToString()); makNgaynhapdukien.Text = com.XuLy(2, this.dathang.NgayNhapDuKien.ToString()); txtNohienthoi.Text = dat.NoHienThoi.ToString(); txtPhuongthucvanchuyen.Text = dat.ToString(); cbxDieukienthanhtoan.SelectedItem = dat.DieuKienThanhToan.ToString(); cbxHinhthucthanhtoan.SelectedItem = dat.HinhThucThanhToan.ToString(); cbxNhanvien.SelectedValue = dat.MaNhanVien.ToString(); check_loaidathang.Checked = dat.LoaiDonDatHang; cbxTiente_Tygia.SelectedValue = dat.MaTienTe.ToString(); txtDiengiai.Text = dat.GhiChu; txtPhikhac.Text = dat.PhiKhac.ToString(); txtPhivanchuyen.Text = dat.Phivanchuyen.ToString(); HienThi_ChiTiet_DonDatHang(); }
/// <summary> /// hungvv =================do du lieu vao txt=========================== /// </summary> /// <param name="dat"></param> private void DoDuLieu(Entities.DonDatHang dat) { Common.Utilities com = new Common.Utilities(); txtSodonhang.Text = dat.MaDonDatHang; txtManhacungcap.Text = dat.MaNhaCungCap; GiaTriCanLuu.Ma = dat.MaNhaCungCap; txtTrangthaidonhang.Text = dat.TrangThaiDonDatHang; cbxDieukienthanhtoan.SelectedValue = dat.DieuKienThanhToan; cbxMaKho.Text = dat.MaKho; makNgaydonhang.Text = com.XuLy(2,this.dathang.NgayDonHang.ToString()); makNgaynhapdukien.Text = com.XuLy(2,this.dathang.NgayNhapDuKien.ToString()); txtNohienthoi.Text = dat.NoHienThoi.ToString(); txtPhuongthucvanchuyen.Text = dat.ToString(); cbxDieukienthanhtoan.SelectedItem = dat.DieuKienThanhToan.ToString(); cbxHinhthucthanhtoan.SelectedItem = dat.HinhThucThanhToan.ToString(); cbxNhanvien.SelectedValue = dat.MaNhanVien.ToString(); check_loaidathang.Checked = dat.LoaiDonDatHang; cbxTiente_Tygia.SelectedValue = dat.MaTienTe.ToString(); txtDiengiai.Text = dat.GhiChu; txtPhikhac.Text = dat.PhiKhac.ToString(); txtPhivanchuyen.Text = dat.Phivanchuyen.ToString(); HienThi_ChiTiet_DonDatHang(); }
/// <summary> /// hungvv =================do du lieu vao txt=========================== /// </summary> /// <param name="dat"></param> private void DoDuLieu(Entities.DonDatHang dat) { try { Common.Utilities com = new Common.Utilities(); ID = dat.DonDatHangID; txtSodonhang.Text = dat.MaDonDatHang; manhacungcap = "" + dat.MaNhaCungCap; //txtManhacungcap.Text = manhacungcap; txtTrangthaidonhang.Text = dat.TrangThaiDonDatHang; cbxMaKho.SelectedValue = dat.MaKho; makNgaydonhang.Text = com.XuLy(2, this.dathang.NgayDonHang.ToString()); makNgaynhapdukien.Text = com.XuLy(2, this.dathang.NgayNhapDuKien.ToString()); txtNohienthoi.Text = dat.NoHienThoi.ToString(); txtPhuongthucvanchuyen.Text = "Tự vận chuyển"; cbxHinhthucthanhtoan.SelectedItem = dat.HinhThucThanhToan.ToString(); cbxNhanvien.SelectedValue = dat.MaNhanVien.ToString(); check_loaidathang.Checked = dat.LoaiDonDatHang; cbxTiente_Tygia.SelectedValue = dat.MaTienTe.ToString(); txtDiengiai.Text = dat.GhiChu; txtPhikhac.Text = dat.PhiKhac.ToString(); txtPhivanchuyen.Text = dat.Phivanchuyen.ToString(); makhachhang = "" + dat.Makhachhang; if (makhachhang != "") { check_loaidathang.Checked = false; txtManhacungcap.Text = makhachhang; checkData(); GiaTriCanLuu.makhachhang = makhachhang; GiaTriCanLuu.Ma = manhacungcap; } if (manhacungcap != "") { check_loaidathang.Checked = true; txtManhacungcap.Text = manhacungcap; checkData(); GiaTriCanLuu.Ma = manhacungcap; GiaTriCanLuu.makhachhang = makhachhang; } if (makhachhang != "" && manhacungcap != "") { if (check_loaidathang.Checked == false) { txtManhacungcap.Text = makhachhang; checkData(); GiaTriCanLuu.makhachhang = "" + dat.Makhachhang; } if (check_loaidathang.Checked == true) { txtManhacungcap.Text = manhacungcap; checkData(); GiaTriCanLuu.Ma = "" + dat.MaNhaCungCap; } } ///tim theo ma HienThi_ChiTiet_DonDatHang(); if (dat.TrangThaiDonDatHang == "Đã thành công") { toolStrip_Insert.Enabled = false; btnTimnhacungcap.Enabled = false; toolStripStatus_Them.Enabled = false; toolStripStatus_Ghilai.Enabled = false; toolStripStatusLabel3.Enabled = false; } else { } } catch (Exception ex) { string s = ex.Message; } }
/// <summary> /// hungvv =================do du lieu vao txt=========================== /// </summary> /// <param name="dat"></param> private void DoDuLieu(Entities.HoaDonNhap dat) { Common.Utilities com = new Common.Utilities(); txtSodonhang.Text = dat.MaHoaDonNhap; txtManhacungcap.Text = dat.MaNhaCungCap; GiaTriCanLuu.Ma = dat.MaNhaCungCap; makNgaydonhang.Text = com.XuLy(2,dat.NgayNhap.ToString()); makHanthanhtoan.Text = com.XuLy(2, dat.HanThanhToan.ToString()); txtNohienthoi.Text = dat.NoHienThoi.ToString(); txtnguoigiaohang.Text = dat.NguoiGiaoHang; cbxHinhthucthanhtoan.SelectedItem = dat.HinhThucThanhToan; cbxKhoHang.SelectedValue = dat.MaKho; cbxDieuKienThanhToan.SelectedItem = dat.DieuKienThanhToan; txtMadondathang.Text= dat.MaDonDatHang; cbxTienTe_TyGia.SelectedValue = dat.MaTienTe; txtChietkhau.Text = dat.ChietKhau.ToString(); txtThanhtoanngay.Text = dat.ThanhToanNgay.ToString(); txtGiatrigiatang.Text = dat.ThueGTGT.ToString(); txtTongtien.Text = dat.TongTien.ToString(); txtDiengiai.Text = dat.GhiChu; //HienThi_ChiTiet_HoaDonNhap(); }