/// <summary> /// 增加一条数据 /// </summary> public long Add(university.Model.CCOM.Examination_subject_score model) { return(dal.Add(model)); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(university.Model.CCOM.Examination_subject_score model) { return(dal.Update(model)); }
/// <summary> /// 获得数据列表 /// </summary> public List <university.Model.CCOM.Examination_subject_score> DataTableToList(DataTable dt) { List <university.Model.CCOM.Examination_subject_score> modelList = new List <university.Model.CCOM.Examination_subject_score>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { university.Model.CCOM.Examination_subject_score model; for (int n = 0; n < rowsCount; n++) { model = new university.Model.CCOM.Examination_subject_score(); if (dt.Rows[n]["Ess_id"].ToString() != "") { model.Ess_id = long.Parse(dt.Rows[n]["Ess_id"].ToString()); } if (dt.Rows[n]["Esn_id"].ToString() != "") { model.Esn_id = int.Parse(dt.Rows[n]["Esn_id"].ToString()); } if (dt.Rows[n]["Ess_score"].ToString() != "") { model.Ess_score = decimal.Parse(dt.Rows[n]["Ess_score"].ToString()); } if (dt.Rows[n]["Ess_sequence"].ToString() != "") { model.Ess_sequence = int.Parse(dt.Rows[n]["Ess_sequence"].ToString()); } if (dt.Rows[n]["Judge_id"].ToString() != "") { model.Judge_id = int.Parse(dt.Rows[n]["Judge_id"].ToString()); } if (dt.Rows[n]["User_id"].ToString() != "") { model.User_id = long.Parse(dt.Rows[n]["User_id"].ToString()); } if (dt.Rows[n]["Ess_score_status"].ToString() != "") { if ((dt.Rows[n]["Ess_score_status"].ToString() == "1") || (dt.Rows[n]["Ess_score_status"].ToString().ToLower() == "true")) { model.Ess_score_status = true; } else { model.Ess_score_status = false; } } if (dt.Rows[n]["Ess_order_status"].ToString() != "") { if ((dt.Rows[n]["Ess_order_status"].ToString() == "1") || (dt.Rows[n]["Ess_order_status"].ToString().ToLower() == "true")) { model.Ess_order_status = true; } else { model.Ess_order_status = false; } } modelList.Add(model); } } return(modelList); }