Exemplo n.º 1
0
        /// <summary>
        /// 获取场景列表
        /// </summary>
        /// <returns></returns>
        private APIResult GetCicList(CicAttrib cicAttrib)
        {
            APIResult rst = new APIResult();

            try
            {
                DataTable dtSource = bll.GetCicList(cicAttrib);
                var       res1     = from s1 in dtSource.AsEnumerable()
                                     select new
                {
                    Id   = CommFunc.ConvertDBNullToInt32(s1["Cic_id"]),
                    Text = CommFunc.ConvertDBNullToString(s1["CicName"]),
                };
                rst.Code = 0;
                rst.Msg  = "";
                rst.Data = new { total = dtSource.Rows.Count, rows = res1.ToList() };
            }
            catch (Exception ex)
            {
                rst.Code = -1;
                rst.Msg  = ex.Message;
                FileLog.WriteLog("获取场景列表错误(GetCicList):" + ex.Message + ex.StackTrace);
            }
            return(rst);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 获取场景列表
 /// </summary>
 /// <returns></returns>
 public DataTable GetCicList(CicAttrib cicAttrib)
 {
     return(dal.GetCicList(cicAttrib));
 }