Exemplo n.º 1
0
        public void Xoa(MauBaoCaoTKTHKD_InFo maubaocao)
        {
            SqlCommand s = new SqlCommand("Delete from MauBaoCaoTKTHKD where MaBCTKTHKD = @ma");

            s.Parameters.Add("@ma", SqlDbType.Int).Value = maubaocao.Mamaubaocao;

            ds.Execute(s);
        }
Exemplo n.º 2
0
        public void Sua(MauBaoCaoTKTHKD_InFo maubaocao)
        {
            SqlCommand s = new SqlCommand("Update MauBaoCaoTKTHKD set TenBCTKTHKD=@ten, MaLoaiBaoCao=@maloai, Nam=@nam where MaBCTKTHKD=@ma");

            s.Parameters.Add("@ma", SqlDbType.Int).Value            = maubaocao.Mamaubaocao;
            s.Parameters.Add("@ten", SqlDbType.NVarChar, 200).Value = maubaocao.Tenbaocao;
            s.Parameters.Add("@maloai", SqlDbType.Int).Value        = maubaocao.Loaibaocao.MaLoaiBaoCao;
            s.Parameters.Add("@nam", SqlDbType.Int).Value           = maubaocao.Nambaocao;

            ds.Execute(s);
        }
Exemplo n.º 3
0
        public void Them(MauBaoCaoTKTHKD_InFo maubaocao)
        {
            SqlCommand s = new SqlCommand("INSERT INTO MauBaoCaoTKTHKD(MaBCTKTHKD, TenBCTKTHKD, MaLoaiBaoCao, Nam) VALUES(@ma, @ten, @maloai, @nam)");

            s.Parameters.Add("@ma", SqlDbType.Int).Value            = maubaocao.Mamaubaocao;
            s.Parameters.Add("@ten", SqlDbType.NVarChar, 200).Value = maubaocao.Tenbaocao;
            s.Parameters.Add("@maloai", SqlDbType.Int).Value        = maubaocao.Loaibaocao.MaLoaiBaoCao;
            s.Parameters.Add("@nam", SqlDbType.Int).Value           = maubaocao.Nambaocao;

            ds.Execute(s);
        }
 public void Sua(MauBaoCaoTKTHKD_InFo maubaocao)
 {
     dbmaubaocao.Sua(maubaocao);
 }
 public void Them(MauBaoCaoTKTHKD_InFo maubaocao)
 {
     dbmaubaocao.Them(maubaocao);
 }