Exemplo n.º 1
0
        public void Insert(PhieuThuTien info)
        {
            string sqlQuery = "insert into PhieuThuTien values ('" +
                info.MaPTT + "','" +               
                info.MaHD + "','" +
                info.NgayThuTien.ToShortDateString() + "'," +
                info.SoTienThu + ")";

            ExecuteNonQuery(sqlQuery);
        }
Exemplo n.º 2
0
        public void Update(PhieuThuTien info)
        {
            string sqlQuery = "update PhieuThuTien" +
                              " set MaPTT='" + info.MaPTT+ "'," +
                              "MaHD='" + info.MaHD + "'" +
                              "NgayThuTien='" + info.NgayThuTien + "'" +
                              "SoTienThu="+info.SoTienThu+
                              "where MaPTT='" + info.MaPTT + "'";

            ExecuteNonQuery(sqlQuery);
        }
Exemplo n.º 3
0
        public List<PhieuThuTien> GetList()
        {
            List<PhieuThuTien> list = new List<PhieuThuTien>();

            string sqlQuery = "select * from PhieuThuTien";

            reader = ExecuteReader(sqlQuery);

            while (reader.Read())
            {
                PhieuThuTien phieuThuTien = new PhieuThuTien();

                phieuThuTien.MaPTT = reader["MaPTT"].ToString();              
                phieuThuTien.MaHD = reader["MaHD"].ToString();
                phieuThuTien.NgayThuTien = (DateTime)reader["NgayThuTien"];
                phieuThuTien.SoTienThu = (double)reader["SoTienThu"];
                
                list.Add(phieuThuTien);
            }

            return list;
        }
Exemplo n.º 4
0
 public void Update(PhieuThuTien info)
 {
     data.Update(info);
 }
Exemplo n.º 5
0
 public void Insert(PhieuThuTien info)
 {
     data.Insert(info);
 }