Пример #1
0
 public DataTable Area_GetUserAreaInfo()
 {
     try
     {
         Area area = new Area(this._OnlineUserInfo.UserId);
         return area.GetUserAreaInfo();
     }
     catch (Exception exception)
     {
         ErrorMsg msg = new ErrorMsg("Alarm", "Area_GetUserAreaInfo", exception.Message);
         this.m_LogHelper.WriteError(msg);
         return null;
     }
 }
Пример #2
0
 public byte[] Area_getAreaInfoAllExByCompress()
 {
     try
     {
         Area area = new Area(this._OnlineUserInfo.UserId);
         return CompressHelper.Compress(area.GetAreaInfoAllEx());
     }
     catch (Exception exception)
     {
         ErrorMsg msg = new ErrorMsg("RemotingServer", "Area_getAreaInfoAllExByCompress", exception.Message);
         this.m_LogHelper.WriteError(msg);
         return null;
     }
 }
Пример #3
0
 public byte[] Area_getAllTreeInfoComPress()
 {
     try
     {
         DataSet allTreeInfo = new Area(this._OnlineUserInfo.UserId).GetAllTreeInfo(this._OnlineUserInfo.WorkId.ToString());
         DataTable table = null;
         DataTable table2 = null;
         DataTable table3 = null;
         if ((allTreeInfo != null) && (allTreeInfo.Tables.Count > 0))
         {
             table = allTreeInfo.Tables[0];
             if (allTreeInfo.Tables.Count > 1)
             {
                 table2 = allTreeInfo.Tables[1];
             }
             if (allTreeInfo.Tables.Count > 2)
             {
                 table3 = allTreeInfo.Tables[2];
             }
         }
         List<GpsDataTable> list = new List<GpsDataTable>();
         if (table != null)
         {
             Dictionary<string, int> columns = new Dictionary<string, int>();
             for (int i = 0; i < table.Columns.Count; i++)
             {
                 columns.Add(table.Columns[i].ColumnName, i);
             }
             GpsDataTable item = new GpsDataTable(columns);
             foreach (DataRow row in table.Rows)
             {
                 item.InsertRows(row.ItemArray);
             }
             list.Add(item);
         }
         if (table2 != null)
         {
             Dictionary<string, int> dictionary2 = new Dictionary<string, int>();
             for (int j = 0; j < table2.Columns.Count; j++)
             {
                 dictionary2.Add(table2.Columns[j].ColumnName, j);
             }
             GpsDataTable table5 = new GpsDataTable(dictionary2);
             foreach (DataRow row2 in table2.Rows)
             {
                 table5.InsertRows(row2.ItemArray);
             }
             list.Add(table5);
         }
         if (table3 != null)
         {
             Dictionary<string, int> dictionary3 = new Dictionary<string, int>();
             for (int k = 0; k < table3.Columns.Count; k++)
             {
                 dictionary3.Add(table3.Columns[k].ColumnName, k);
             }
             GpsDataTable table6 = new GpsDataTable(dictionary3);
             foreach (DataRow row3 in table3.Rows)
             {
                 table6.InsertRows(row3.ItemArray);
             }
             list.Add(table6);
         }
         return CompressHelper.CompressToSelf(list);
     }
     catch (Exception exception)
     {
         ErrorMsg msg = new ErrorMsg("Alarm", "Area_getAllTreeInfo", exception.Message);
         this.m_LogHelper.WriteError(msg);
         return null;
     }
 }
Пример #4
0
 public DataTable Area_getAreaInfoAll()
 {
     try
     {
         Area area = new Area(this._OnlineUserInfo.UserId);
         return area.GetAreaInfoAll();
     }
     catch (Exception exception)
     {
         ErrorMsg msg = new ErrorMsg("RemotingServer", "getAllAreaInfosByParentId", exception.Message);
         this.m_LogHelper.WriteError(msg);
         return null;
     }
 }
Пример #5
0
 public DataSet Area_getAllTreeInfo()
 {
     try
     {
         Area area = new Area(this._OnlineUserInfo.UserId);
         return area.GetAllTreeInfo(this._OnlineUserInfo.WorkId.ToString());
     }
     catch (Exception exception)
     {
         ErrorMsg msg = new ErrorMsg("Alarm", "Area_getAllTreeInfo", exception.Message);
         this.m_LogHelper.WriteError(msg);
         return null;
     }
 }