private void btnQLNVThem_Click(object sender, EventArgs e)
        {
            txtQLNVHoTen.Text  = "";
            txtQLNVSoDT.Text   = "";
            txtQLNVChucVu.Text = "";

            txtDoB.Text = "";
            txtAnh.Text = "";

            cmb.Enabled           = false;
            txtQLNVHoTen.Enabled  = true;
            txtDoB.Enabled        = true;
            txtQLNVSoDT.Enabled   = true;
            txtQLNVChucVu.Enabled = true;
            rdbNam.Checked        = true;
            btnLuu1.Enabled       = true;

            string idnv = cm.AutoCode("NHANVIEN", "idNV", "NV0");

            cmb.Text = idnv;

            btnQLNVSua.Enabled = false;
            btnQLNVXoa.Enabled = false;
            btnHuy.Enabled     = true;

            if (rdbNam.Checked == true)
            {
                gt = "Nam";
            }
            else
            {
                gt = "Nữ";
            }
        }
        private void btnThem_Click(object sender, EventArgs e)
        {
            cbKHMaKhachHang.Enabled = false;

            btnKHLuu.Enabled = true;
            btnKHSua.Enabled = false;
            btnKHXoa.Enabled = false;
            btnKHHuy.Enabled = true;

            string KHACHHANG = "KHACHHANG";
            string idKH      = "idKH";

            idKH = cm.AutoCode(KHACHHANG, idKH, "KH0");
            cbKHMaKhachHang.Text = idKH;

            txtKHNgaySinh.Enabled = true;
            txtKHHoTen.Enabled    = true;
            txtKHSoDT.Enabled     = true;
            txtKHDiaChi.Enabled   = true;
            picAnh.Enabled        = true;

            txtKHHoTen.Text    = "";
            txtKHDiaChi.Text   = "";
            txtKHSoDT.Text     = "";
            txtKHNgaySinh.Text = "";
            picAnh.Image       = null;

            os = "open";
        }
Exemple #3
0
        private void btnTao_Click(object sender, EventArgs e)
        {
            string tableName   = "HOADONBAN";
            string FildeName   = "idHD";
            string startString = "HDB" + DateTime.Now.ToShortDateString();

            txtKHMaHD.Text = cm.AutoCode(tableName, FildeName, startString);

            btnDoAnUongCTHD.Enabled = false;

            cbDoAnUongMaKH.Enabled     = true;
            btnDoAnUongThem.Enabled    = true;
            btnDoAnUongNhapLai.Enabled = true; //xoa thong tin hoa don hien tai

            txtDoAnUongMaMon.Text  = "";
            cbDoAnUongMaKH.Text    = "";
            txtDoAnUongDonGia.Text = "0";
            NUM.Value             = 0;
            txtDoAnUongMoTa.Text  = "";
            cbDoAnUongTenMon.Text = "";
            txtDoAnUongNote.Text  = "";
        }
Exemple #4
0
 private void btnThem_Click(object sender, EventArgs e)
 {
     Classes.Common com = new Classes.Common();
     txtMaHD.Text = com.AutoCode("tblHDBan", "MaHDB", "HĐ" + DateTime.Now.ToShortDateString());
 }