コード例 #1
0
        public int ThemPhieuPhat(DTO_PhieuPhat DTO)
        {
            string    strSql   = "usp_ThemPhieuPhat";
            DBConnect provider = new DBConnect();

            provider.Connect();

            SqlParameter p = new SqlParameter("@Result", SqlDbType.Int);

            p.Direction = ParameterDirection.Output;

            provider.ExecuteNonQuery(CommandType.StoredProcedure, strSql,
                                     new SqlParameter {
                ParameterName = "@MaPhieuMuon", Value = DTO.MaPhieuMuon
            },
                                     new SqlParameter {
                ParameterName = "@MaNVLapPhieuPhat", Value = DTO.MaNVLapPhieuPhat
            }, p);
            provider.Disconnect();
            return(Int32.Parse(p.Value.ToString()));
        }
コード例 #2
0
 public int ThemPhieuPhat(DTO_PhieuPhat DTO)
 {
     return(dal_Phieuphat.ThemPhieuPhat(DTO));
 }