Exemplo n.º 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);
        }
Exemplo n.º 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;
        }
Exemplo n.º 3
0
        public void insert(PhieuGiaoDichDTO info)
        {
            string insertCommand = "INSERT INTO PhieuGiaoDich VALUES('" +
                info.MaPhieu + "', '" +
                info.MaDaiLy + "', '" +
                info.NgayLapPhieu + "', '" +
                info.LoaiPhieu + ")";

            executeNonQuery(insertCommand);
        }