Example #1
0
        public void update(DoanhSoDaiLyDTO info)
        {
            string updateCommand = "UPDATE BaoCaoDoanhSo " +
                                    "SET MaDaiLy = '" + info.MaDaiLy + "', " +
                                    " Thang = '" + info.Thang + "', " +
                                    " SoPhieuXuat = '" + info.SoPhieuXuat + "', " +
                                    " TongGiaTri = '" + info.TongGiaTri + "', " +
                                    " WHERE MaBaoCao = '" + info.MaBaoCao + "'";

            executeNonQuery(updateCommand);
        }
Example #2
0
        protected override object GetDataFromDataRow(DataTable dt, int i)
        {
            DoanhSoDaiLyDTO dsdl = new DoanhSoDaiLyDTO();
            dsdl.MaBaoCao = dt.Rows[i]["MaBaoCao"].ToString();
            dsdl.MaDaiLy = dt.Rows[i]["MaDaiLy"].ToString();
            dsdl.Thang = DateTime.Parse(dt.Rows[i]["Thang"].ToString());
            dsdl.SoPhieuXuat = int.Parse(dt.Rows[i]["SoPhieuXuat"].ToString());
            dsdl.TongGiaTri = int.Parse(dt.Rows[i]["TongGiaTri"].ToString());

            return (object)dsdl;
        }
Example #3
0
        public void insert(DoanhSoDaiLyDTO info)
        {
            string insertCommand = "INSERT INTO BaoCaoDoanhSo VALUES('" +
                info.MaBaoCao + "', '" +
                info.MaDaiLy + "', '" +
                info.Thang + "', '" +
                info.SoPhieuXuat + "', '" +
                info.TongGiaTri + ")";

            executeNonQuery(insertCommand);
        }