Ejemplo n.º 1
0
 public static void CopyAuctionDB2Item(GoldAuctionDBItem sData, out GoldAuctionItem rData)
 {
     try
     {
         rData = new GoldAuctionItem();
         rData.ProductionTime = sData.ProductionTime;
         rData.AuctionTime    = sData.AuctionTime;
         rData.AuctionSource  = sData.AuctionSource;
         rData.StrGoods       = sData.StrGoods;
         rData.BuyerData      = new AuctionRoleData();
         CopyData.Copy <AuctionRoleData>(sData.BuyerData, ref rData.BuyerData);
         foreach (AuctionRoleData item in sData.RoleList)
         {
             AuctionRoleData temp = new AuctionRoleData();
             CopyData.Copy <AuctionRoleData>(item, ref temp);
             rData.RoleList.Add(temp);
         }
         rData.BossLife       = sData.BossLife;
         rData.KillBossRoleID = sData.KillBossRoleID;
         rData.UpDBWay        = sData.UpDBWay;
         rData.AuctionType    = sData.AuctionType;
         rData.OldAuctionType = sData.OldAuctionType;
         rData.Lock           = false;
     }
     catch (Exception ex)
     {
         rData = null;
         LogManager.WriteLog(LogTypes.Exception, string.Format("[ljl]{0}", ex.ToString()), null, true);
     }
 }
Ejemplo n.º 2
0
 public static void CopyAuctionItem2DB(GoldAuctionItem sData, out GoldAuctionDBItem rData)
 {
     try
     {
         rData = new GoldAuctionDBItem();
         CopyData.Copy <GoldAuctionDBItem>(sData, ref rData);
         rData.BuyerData = new AuctionRoleData();
         CopyData.Copy <AuctionRoleData>(sData.BuyerData, ref rData.BuyerData);
         rData.RoleList = new List <AuctionRoleData>();
         foreach (AuctionRoleData item in sData.RoleList)
         {
             AuctionRoleData temp = new AuctionRoleData();
             CopyData.Copy <AuctionRoleData>(item, ref temp);
             rData.RoleList.Add(temp);
         }
     }
     catch (Exception ex)
     {
         rData = null;
         LogManager.WriteLog(LogTypes.Exception, string.Format("[ljl]{0}", ex.ToString()), null, true);
     }
 }