void IStudent.SaveStudent(CheckIn.Model.Student student) { var entity = new entity.StudentEntity(); entity.Id = student.Id; entity.IsHide = student.IsHide; entity.Name = student.Name; if (student.Id == 0) { //更新人脸识别库 //if(student.) } }
string IStudent.ImportStudent(string file) { var ds = GetExcelData(file); int i = 0, j = 0; string msg = ""; foreach (DataRow dr in ds.Tables[0].Rows) { try { var saveStudent = new entity.StudentEntity(); saveStudent.Name = dr[1].ToString(); saveStudent.FatherTelephone = dr[2].ToString(); saveStudent.MotherTelephone = dr[3].ToString(); _db.Save(saveStudent); i++; } catch (Exception e) { j++; } } return(string.Format("成功导入数据{0}条,失败{1}条", i, j)); }