コード例 #1
0
ファイル: PackageProvider.cs プロジェクト: vinay1988/Ang6API
        /// <summary>
        /// Returns a new PackageDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual PackageDetails GetPackageFromReader(DbDataReader reader)
        {
            PackageDetails package = new PackageDetails();

            if (reader.HasRows)
            {
                package.PackageId          = GetReaderValue_Int32(reader, "PackageId", 0);            //From: [Table]
                package.PackageName        = GetReaderValue_String(reader, "PackageName", "");        //From: [Table]
                package.PackageDescription = GetReaderValue_String(reader, "PackageDescription", ""); //From: [Table]
                package.Inactive           = GetReaderValue_Boolean(reader, "Inactive", false);       //From: [Table]
                package.UpdatedBy          = GetReaderValue_NullableInt32(reader, "UpdatedBy", null); //From: [Table]
                package.DLUP = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);            //From: [Table]
            }
            return(package);
        }
コード例 #2
0
 /// <summary>
 /// Get
 /// Calls [usp_select_Package]
 /// </summary>
 public static Package Get(System.Int32?packageId)
 {
     Rebound.GlobalTrader.DAL.PackageDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.Package.Get(packageId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         Package obj = new Package();
         obj.PackageId          = objDetails.PackageId;
         obj.PackageName        = objDetails.PackageName;
         obj.PackageDescription = objDetails.PackageDescription;
         obj.Inactive           = objDetails.Inactive;
         obj.UpdatedBy          = objDetails.UpdatedBy;
         obj.DLUP   = objDetails.DLUP;
         objDetails = null;
         return(obj);
     }
 }