Example #1
0
 //KetNoiCMND ketNoiCMND;
 //KetNoiKetHon ketNoiKetHon;
 //KetNoiHoKhau ketNoiHoKhau;
 public KetNoiCongDan()
 {
     db = Form1.db;
     //ketNoiCMND = new KetNoiCMND();
     //ketNoiKetHon = new KetNoiKetHon();
     //ketNoiHoKhau = new KetNoiHoKhau();
 }
Example #2
0
        public DataTable LayCongDan()
        {
            QuanLyDanCuModelADO db = new QuanLyDanCuModelADO();
            DataSet             sd = db.ExecuteQueryDataSet("select * from ConDans", CommandType.Text);

            return(sd.Tables[0]);
        }
Example #3
0
        public bool ThietLap(string xa, string quan, string thanhpho)
        {
            QuanLyDanCuModelADO db = Form1.db;
            string sqlString       = "delete * from DonViQuanLis";

            return(db.MyExecuteNonQuery(sqlString, CommandType.Text));
        }
Example #4
0
        public DonViQuanLi LayDonVi()
        {
            QuanLyDanCuModelADO db        = Form1.db;
            string             sqlString  = "select * from DonViQuanLis ";
            DataSet            ds         = db.ExecuteQueryDataSet(sqlString, CommandType.Text);
            DataTable          dt         = ds.Tables[0];
            List <DonViQuanLi> thuongtrus = new List <DonViQuanLi>();

            foreach (DataRow dr in dt.Rows)
            {
                DonViQuanLi tt = findById((string)dr.ItemArray[0]);
                thuongtrus.Add(tt);
            }
            return(thuongtrus[0]);
        }
Example #5
0
 public DonViQuanLi findById(string id)
 {
     try
     {
         QuanLyDanCuModelADO db = Form1.db;
         string      sqlString  = "select * from DonViQuanLis where So = " + id + "";
         DataSet     ds         = db.ExecuteQueryDataSet(sqlString, CommandType.Text);
         DonViQuanLi gks        = new DonViQuanLi()
         {
             id       = (int)ds.Tables[0].Rows[0].ItemArray[0],
             Phuong   = (string)ds.Tables[0].Rows[0].ItemArray[1],
             Quan     = (string)ds.Tables[0].Rows[0].ItemArray[2],
             ThanhPho = (string)ds.Tables[0].Rows[0].ItemArray[3],
         };
         return(gks);
     }
     catch (Exception e)
     {
         MessageBox.Show("Lỗi FindById TamVang!!! + " + e.Message);
         return(null);
     }
 }
Example #6
0
 //KetNoiCongDan ketNoiCongDan;
 public KetNoiKhaiSinh()
 {
     db = Form1.db;
     //ketNoiCongDan = new KetNoiCongDan();
 }
Example #7
0
 public KetNoiCMND()
 {
     db = Form1.db;
 }
Example #8
0
 public KetNoiHoKhau()
 {
     db            = Form1.db;
     ketNoiCongDan = new KetNoiCongDan();
 }
Example #9
0
 public KetNoiQuanHe()
 {
     db = Form1.db;
 }
Example #10
0
 //KetNoiCongDan ketNoiCongDan;
 public KetNoiNhanConNuoi()
 {
     db = Form1.db;
     //ketNoiCongDan = new KetNoiCongDan();
 }
Example #11
0
        public void CapNhatNgayHuy(string MaCD, DateTime NgayHuy)
        {
            QuanLyDanCuModelADO db = new QuanLyDanCuModelADO();

            updateNgayHuy(MaCD, NgayHuy);
        }
Example #12
0
 //KetNoiCongDan ketNoiCongDan;
 public KetNoiKetHon()
 {
     db = Form1.db;
     //ketNoiCongDan = new KetNoiCongDan();
 }
Example #13
0
 public KetNoiQuanHeHoKhau()
 {
     db           = Form1.db;
     ketNoiQuanHe = new KetNoiQuanHe();
 }
Example #14
0
 //KetNoiCongDan ketNoiCongDan;
 public KetNoiCapGiayTo()
 {
     db = Form1.db;
     //ketNoiCongDan = new KetNoiCongDan();
 }
Example #15
0
 public KetNoiNguoiDung()
 {
     quanLyDanCuModelADO = Form1.db;;
 }
Example #16
0
 //KetNoiCongDan ketNoiCongDan;
 public KetNoiChungTu()
 {
     db = Form1.db;
     //ketNoiCongDan = new KetNoiCongDan();
 }