コード例 #1
0
        public frmSanPhamSua(frmSanPham f, string masp)
        {
            InitializeComponent();
            BU_NhaSanXuat nsx = new BU_NhaSanXuat();

            cbxMaNSX.DataSource    = nsx.getAll();
            cbxMaNSX.DisplayMember = "TENNSX";
            cbxMaNSX.ValueMember   = "MANSX";
            tg           = f;
            txtMaSP.Text = masp;
            BU_SanPham sp  = new BU_SanPham();
            DataTable  tb  = sp.tkMa(masp);
            DataRow    row = tb.Rows[0];

            txtBoNho.Text     = row["BONHO"].ToString();
            txtCamera.Text    = row["CAMERA"].ToString();
            txtCPU.Text       = row["CPU"].ToString();
            txtDonGiaBan.Text = row["DONGIABAN"].ToString();
            //txtDonGiaNhap.Text = row["DONGIANHAP"].ToString();
            txtDVT.Text            = row["DONVITINH"].ToString();
            txtHeDieuHanh.Text     = row["HEDIEUHANH"].ToString();
            txtKetNoi.Text         = row["KETNOI"].ToString();
            txtPin.Text            = row["PIN"].ToString();
            txtRam.Text            = row["RAM"].ToString();
            txtSoLuong.Text        = row["SOLUONG"].ToString();
            txtTenSP.Text          = row["TENSP"].ToString();
            cbxMaNSX.SelectedValue = row["MANSX"].ToString();
        }
コード例 #2
0
 public frmSanPhamThem(frmSanPham f)
 {
     InitializeComponent();
     tg = f;
 }
コード例 #3
0
        private void sảnPhẩmToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmSanPham f = new frmSanPham();

            adInPanel(panel, f);
        }