Exemplo n.º 1
0
 private void frmPhieuThuChi_Load(object sender, EventArgs e)
 {
     txtNguoiLap.Text           = Program.userName;
     txtNgayLap.Text            = DateTime.Now.ToString("yyyy / MM / dd");
     txtMaPhieu.Text            = myStr.RandomString(10);
     cbbLoaiPhieu.DataSource    = query.GetAll("loaiphieuthuchi");
     cbbLoaiPhieu.DisplayMember = "Ten";
     cbbLoaiPhieu.ValueMember   = "Id";
 }
Exemplo n.º 2
0
        private void ctlPhieuCamDo_Load(object sender, EventArgs e)
        {
            dt.Columns.Add("TenHang", typeof(string));
            dt.Columns.Add("DVT", typeof(string));
            dt.Columns.Add("SoLuong", typeof(int));
            dt.Columns.Add("DinhGia", typeof(int));
            dt.Columns.Add("ChuThich", typeof(string));

            txtNguoiLap.Text = Program.userName;
            txtNgayLap.Text  = DateTime.Now.ToString("yyyy / MM / dd");
            txtMaPhieu.Text  = myStr.RandomString(10);

            cbbCachTinhLai.DataSource    = userDao.GetAll("cachtinhlai");
            cbbCachTinhLai.ValueMember   = "Id";
            cbbCachTinhLai.DisplayMember = "CachTinhLai";

            cbbNhomKH.DataSource    = userDao.GetAll("nhomkhachhang");
            cbbNhomKH.DisplayMember = "NhomKhachHang";
            cbbNhomKH.ValueMember   = "Id";
            gctl_main.DataSource    = dt;
        }