Beispiel #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <JMP.MDL.jmp_terminal> DataTableToList(DataTable dt)
        {
            List <JMP.MDL.jmp_terminal> modelList = new List <JMP.MDL.jmp_terminal>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                JMP.MDL.jmp_terminal model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new JMP.MDL.jmp_terminal();
                    if (dt.Rows[n]["t_id"].ToString() != "")
                    {
                        model.t_id = int.Parse(dt.Rows[n]["t_id"].ToString());
                    }
                    model.t_system   = dt.Rows[n]["t_system"].ToString();
                    model.t_hardware = dt.Rows[n]["t_hardware"].ToString();
                    model.t_sdkver   = dt.Rows[n]["t_sdkver"].ToString();
                    if (dt.Rows[n]["t_time"].ToString() != "")
                    {
                        model.t_time = DateTime.Parse(dt.Rows[n]["t_time"].ToString());
                    }
                    model.t_screen   = dt.Rows[n]["t_screen"].ToString();
                    model.t_network  = dt.Rows[n]["t_network"].ToString();
                    model.t_key      = dt.Rows[n]["t_key"].ToString();
                    model.t_mark     = dt.Rows[n]["t_mark"].ToString();
                    model.t_ip       = dt.Rows[n]["t_ip"].ToString();
                    model.t_province = dt.Rows[n]["t_province"].ToString();
                    model.t_imsi     = dt.Rows[n]["t_imsi"].ToString();
                    model.t_nettype  = dt.Rows[n]["t_nettype"].ToString();
                    model.t_brand    = dt.Rows[n]["t_brand"].ToString();


                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Beispiel #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(JMP.MDL.jmp_terminal model)
 {
     return(dal.Update(model));
 }
Beispiel #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(JMP.MDL.jmp_terminal model)
 {
     return(dal.Add(model));
 }