Exemple #1
0
        private void btnThemSP_Click(object sender, EventArgs e)
        {
            frmChiTietSanPham ctsp = new frmChiTietSanPham(null, User.MaCuaHang, null, false);

            ctsp.ShowDialog();
            LoadSp();
        }
Exemple #2
0
        private void linklbChiTietSP_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (txtboxMaKieuSP.Text == "")
            {
                return;
            }
            frmChiTietSanPham ctsp = new frmChiTietSanPham(ChiTietSPBUS.GetMaSPByIDKieuSP(txtboxMaKieuSP.Text).MaSP, User.MaCuaHang, null, false);

            ctsp.ShowDialog();
        }
Exemple #3
0
 private void btnChiTietSP_Click(object sender, EventArgs e)
 {
     try
     {
         int               r    = dgvSP.CurrentCell.RowIndex;
         string            id   = dgvSP.Rows[r].Cells[0].Value.ToString();
         frmChiTietSanPham ctsp = new frmChiTietSanPham(id, User.MaCuaHang, null, false);
         ctsp.ShowDialog();
     }
     catch { }
 }
        private void btnThemSP_Click(object sender, EventArgs e)
        {
            frmChiTietSanPham ctsp = new frmChiTietSanPham(null, "ts", null, false);

            ctsp.ShowDialog();
            try
            {
                cmBoxSP.DataSource = null;
                string id = cmBoxDSP.SelectedValue.ToString();


                if (SanPhamBUS.GetSanPhamByMaDSP(id).Count != 0)
                {
                    cmBoxSP.DataSource    = SanPhamBUS.GetSanPhamByMaDSP(id);
                    cmBoxSP.DisplayMember = "TenSP";
                    cmBoxSP.ValueMember   = "MaSP";
                }
                else
                {
                    cmBoxSP.DataSource = null;
                }
            }
            catch { cmBoxSP.DataSource = null; }
        }
Exemple #5
0
        private void btnThemSP_Click(object sender, EventArgs e)
        {
            frmChiTietSanPham ctsp = new frmChiTietSanPham(null, "ts", null, false);

            ctsp.ShowDialog();
        }