示例#1
0
        public int ThemDataVaoPhieuBaoCaoMatDo(PhieuCaoBaoMatDo bc)
        {
            int      n        = 0;
            Provider provider = new Provider();

            try
            {
                string strSql = "INSERT INTO PHIEUBAOCAOMATDOSUDUNGPHONG(MaPhieuBaoCaoMatDoSuDungPhong,MaLoaiPhong,MatDo,TiLe,ThangBaoCaoMatDo) VALUES (@MaPhieuBaoCaoMatDoSuDungPhong,@MaLoaiPhong,@MatDo,@TiLe,@ThangBaoCaoMatDo)";
                provider.Connect();;
                n = provider.ExecuteNonQuery(CommandType.Text, strSql,
                                             new SqlParameter {
                    ParameterName = "@MaPhieuBaoCaoMatDoSuDungPhong", Value = bc.MaPhieuMatDo
                },
                                             new SqlParameter {
                    ParameterName = "@MaLoaiPhong", Value = bc.MaLoaiPhong
                },
                                             new SqlParameter {
                    ParameterName = "@MatDo", Value = bc.MatDo
                },
                                             new SqlParameter {
                    ParameterName = "@TiLe", Value = bc.TiLe
                },
                                             new SqlParameter {
                    ParameterName = "@ThangBaoCaoMatDo", Value = bc.Thang
                }

                                             );
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            finally
            {
                provider.DisConnect();
            }
            return(n);
        }
示例#2
0
        public int ThemDataVaoPhieuBaoCaoMatDo(PhieuCaoBaoMatDo bc)
        {
            ReportDAL xl = new ReportDAL();

            return(xl.ThemDataVaoPhieuBaoCaoMatDo(bc));
        }