Example #1
0
        public void update(PhieuGiaoDichDTO info)
        {
            string updateCommand = "UPDATE PhieuGiaoDich " +
                                    "SET MaDaiLy = '" + info.MaDaiLy + "', " +
                                    " NgayLapPhieu = '" + info.NgayLapPhieu + "', " +
                                    " LoaiPhieu = '" + info.LoaiPhieu + "', " +
                                    " WHERE MaPhieu = '" + info.MaPhieu + "'";

            executeNonQuery(updateCommand);
        }
Example #2
0
        protected override object GetDataFromDataRow(DataTable dt, int i)
        {
            PhieuGiaoDichDTO pgd = new PhieuGiaoDichDTO();
            pgd.MaPhieu = dt.Rows[i]["MaPhieu"].ToString();
            pgd.MaDaiLy = dt.Rows[i]["MaDaiLy"].ToString();
            pgd.NgayLapPhieu = DateTime.Parse(dt.Rows[i]["NgayLapPhieu"].ToString());
            pgd.LoaiPhieu = dt.Rows[i]["LoaiPhieu"].ToString();

            return (object)pgd;
        }
Example #3
0
        public void insert(PhieuGiaoDichDTO info)
        {
            string insertCommand = "INSERT INTO PhieuGiaoDich VALUES('" +
                info.MaPhieu + "', '" +
                info.MaDaiLy + "', '" +
                info.NgayLapPhieu + "', '" +
                info.LoaiPhieu + ")";

            executeNonQuery(insertCommand);
        }