/// <summary> /// 获得数据列表 /// </summary> public List <JMP.MDL.jmp_operatingsystem> DataTableToList(DataTable dt) { List <JMP.MDL.jmp_operatingsystem> modelList = new List <JMP.MDL.jmp_operatingsystem>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { JMP.MDL.jmp_operatingsystem model; for (int n = 0; n < rowsCount; n++) { model = new JMP.MDL.jmp_operatingsystem(); if (dt.Rows[n]["o_id"].ToString() != "") { model.o_id = int.Parse(dt.Rows[n]["o_id"].ToString()); } model.o_system = dt.Rows[n]["o_system"].ToString(); if (dt.Rows[n]["o_app_id"].ToString() != "") { model.o_app_id = int.Parse(dt.Rows[n]["o_app_id"].ToString()); } if (dt.Rows[n]["o_count"].ToString() != "") { model.o_count = int.Parse(dt.Rows[n]["o_count"].ToString()); } if (dt.Rows[n]["o_time"].ToString() != "") { model.o_time = DateTime.Parse(dt.Rows[n]["o_time"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(JMP.MDL.jmp_operatingsystem model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(JMP.MDL.jmp_operatingsystem model) { return(dal.Add(model)); }