コード例 #1
0
 private void load()
 {
     gridDSDichVu.DataSource = DichVu_Info.SelectAllTable();
     dsDichVuKe = DichVu_Info.SelectAllTable();
     gridDSDichVuKe.DataSource = dsDichVuKe;
     dsDichVuKe.Rows.Clear();
 }
コード例 #2
0
        private void btn_ThemDV_Click(object sender, EventArgs e)
        {
            frmDichVu f = new frmDichVu();

            f.ShowDialog();
            gridDSDichVu.DataSource = DichVu_Info.SelectAllTable();
            txtMaDichVu.Select();
        }
コード例 #3
0
        private void load()
        {
            gridDanhSach.DataSource = DichVu_Info.SelectAllTable();

            Util.FormHandler.SetSourceForGridCustomCollumns(gridDanhSach, new string[] { "MaDichVu", "TenDichVu", "DonViTinh", "DonGia" }, new string[] { "Mã dịch vụ", "Tên dịch vụ", "Đơn vị tính", "Đơn giá" });
            Util.ResetControl.ReadOnly_Control(this);
            isInsert = 0;
        }
コード例 #4
0
        private bool check2()
        {
            if (isInsert == 1)
            {
                DataTable b = DichVu_Info.SelectAllTable();
                foreach (DataRow r in b.Rows)
                {
                    if (r["MaDichVu"].ToString() == txtMaDV.Text)
                    {
                        error.SetError(txtMaDV, "Trùng mã");
                        txtMaDV.Select();
                        return(false);
                    }
                }
            }
            ArrayList list = new ArrayList();

            list.Add(txtMaDV);
            list.Add(cbx_Phong);
            list.Add(txtTenDV);
            list.Add(txtDonGia);
            return(Util.ResetControl.CheckValue(list, error));
        }