Exemplo n.º 1
0
        /// <summary>
        /// 添加到活跃表
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        private InnerResponse Insertliveteral(jmp_terminal model)
        {
            InnerResponse Inn = new InnerResponse();

            try
            {
                JMP.MDL.jmp_liveteral mo    = new JMP.MDL.jmp_liveteral(); //活跃实体类型
                JMP.BLL.jmp_liveteral hybll = new JMP.BLL.jmp_liveteral(); //活跃业务逻辑层
                mo.l_teral_key = model.t_key;
                mo.l_time      = DateTime.Now;
                mo.l_appid     = model.t_appid;
                int cg = 0;
                cg = hybll.Add(mo);
                if (cg > 0)
                {
                    Inn = Inn.InfoToResponse(InfoErrorCode.Code100);
                }
                else
                {
                    Inn = Inn.InfoToResponse(InfoErrorCode.Code101);
                }
            }
            catch (Exception e)
            {
                string bcxx = "报错提示" + e.Message + "报错对象:" + e.Source + "报错方法:" + e.TargetSite + "报错信息:" + e.ToString() + "报错位置:" + e.StackTrace.ToString();//报错信息
                //AddLocLog.AddLog(1, 4, "", "接口错误信息", "添加到活跃表,报错信息:" + bcxx);//写入报错日志
                PayApiGlobalErrorLogger.Log("添加到活跃表,报错信息:" + bcxx, summary: "接口错误信息");
                Inn = Inn.InfoToResponse(InfoErrorCode.Code101);
            }

            return(Inn);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <JMP.MDL.jmp_liveteral> DataTableToList(DataTable dt)
        {
            List <JMP.MDL.jmp_liveteral> modelList = new List <JMP.MDL.jmp_liveteral>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                JMP.MDL.jmp_liveteral model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new JMP.MDL.jmp_liveteral();
                    if (dt.Rows[n]["l_id"].ToString() != "")
                    {
                        model.l_id = int.Parse(dt.Rows[n]["l_id"].ToString());
                    }
                    model.l_teral_key = dt.Rows[n]["l_teral_key"].ToString();
                    if (dt.Rows[n]["l_time"].ToString() != "")
                    {
                        model.l_time = DateTime.Parse(dt.Rows[n]["l_time"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Exemplo n.º 3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(JMP.MDL.jmp_liveteral model)
 {
     return(dal.Update(model));
 }
Exemplo n.º 4
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(JMP.MDL.jmp_liveteral model)
 {
     return(dal.Add(model));
 }