/// <summary> /// 获得数据列表 /// </summary> public List <JMP.MDL.jmp_queue> DataTableToList(DataTable dt) { List <JMP.MDL.jmp_queue> modelList = new List <JMP.MDL.jmp_queue>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { JMP.MDL.jmp_queue model; for (int n = 0; n < rowsCount; n++) { model = new JMP.MDL.jmp_queue(); if (dt.Rows[n]["q_id"].ToString() != "") { model.q_id = int.Parse(dt.Rows[n]["q_id"].ToString()); } model.q_order_code = dt.Rows[n]["q_order_code"].ToString(); model.q_bizcode = dt.Rows[n]["q_bizcode"].ToString(); model.q_address = dt.Rows[n]["q_address"].ToString(); if (dt.Rows[n]["q_noticestate"].ToString() != "") { model.q_noticestate = int.Parse(dt.Rows[n]["q_noticestate"].ToString()); } if (dt.Rows[n]["q_times"].ToString() != "") { model.q_times = int.Parse(dt.Rows[n]["q_times"].ToString()); } if (dt.Rows[n]["q_noticetimes"].ToString() != "") { model.q_noticetimes = DateTime.Parse(dt.Rows[n]["q_noticetimes"].ToString()); } model.q_tablename = dt.Rows[n]["q_tablename"].ToString(); model.q_sign = dt.Rows[n]["q_sign"].ToString(); model.q_privateinfo = dt.Rows[n]["q_privateinfo"].ToString(); modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(JMP.MDL.jmp_queue model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(JMP.MDL.jmp_queue model) { dal.Add(model); }