Ejemplo n.º 1
0
 public static void SyncUnits(SmartBox.Console.Bo.AppCenter.AppCenterBO bo, OutsideWS.WebService ws)
 {
     IList<SMC_Unit> units = bo.GetNeedSyncSMC_Units();
     OutsideWS.SMC_Unit[] _units = new OutsideWS.SMC_Unit[units.Count];
     for (int i = 0; i < units.Count; ++i)
     {
         _units[i] = CopySMC_Unit(units[i]);
     }
     ws.SMC_UnitSync(_units.ToArray());
 }
Ejemplo n.º 2
0
        static OutsideWS.SMC_Unit CopySMC_Unit(SMC_Unit unit)
        {
            OutsideWS.SMC_Unit entity = new OutsideWS.SMC_Unit();
            entity.Unit_CreatedTime = unit.Unit_CreatedTime;
            entity.Unit_CreatedUser = unit.Unit_CreatedUser;
            entity.Unit_Demo = unit.Unit_Demo;
            entity.Unit_ID = Convert.ToInt32(unit.Unit_ID);
            entity.Unit_Name = unit.Unit_Name;
            entity.Unit_Path = unit.Unit_Path;
            entity.Unit_Sequence = unit.Unit_Sequence;
            entity.Unit_UpdateTime = unit.Unit_UpdateTime;
            entity.Unit_UpdateUser = unit.Unit_UpdateUser;
            entity.Upper_Unit_ID = Convert.ToInt32(unit.Upper_Unit_ID);

            return entity;
        }