/// <summary> /// 保存基本资料 /// </summary> /// <param name="m"></param> /// <returns></returns> public static int saveEmployee(Models.employeePersonal m) { using (employeeDAL dal = new employeeDAL()) { return(dal.saveEmployee(m)); } }
//保存基本资料 public int saveEmployee(Models.employeePersonal m) { SqlParameter[] pars = new SqlParameter[] { new SqlParameter("@eid", m.eid), new SqlParameter("@name", m.name), new SqlParameter("@sex", m.sex), new SqlParameter("@phone", m.phone), new SqlParameter("@email", m.email), new SqlParameter("@zzmm", m.zzmm), new SqlParameter("@nation", m.nation), new SqlParameter("@degreeid", m.degreeid), new SqlParameter("@photo", m.photo), new SqlParameter("@retu", SqlDbType.Int) }; pars[9].Direction = ParameterDirection.ReturnValue; SqlHelper.RunProcedures("[me_saveEmployee]", pars); return(Convert.ToInt32(pars[9].Value)); }