/// <summary> /// 更新 /// </summary> /// <param name="model"></param> /// <returns></returns> public int Updata(Model.Db model) { int rowsAffected; SqlParameter[] parameters = { new SqlParameter("@ReturnValue", SqlDbType.Int), new SqlParameter("@Server", SqlDbType.NVarChar, 500), new SqlParameter("@Database", SqlDbType.NVarChar, 500), new SqlParameter("@Password", SqlDbType.NVarChar, 500), new SqlParameter("@Instance", SqlDbType.NVarChar, 500), new SqlParameter("@Port", SqlDbType.NVarChar, 500), new SqlParameter("@User", SqlDbType.NVarChar, 500), new SqlParameter("@Key", SqlDbType.NVarChar, 500), }; parameters[0].Direction = ParameterDirection.Output; parameters[1].Value = model.Server; parameters[2].Value = model.Database; parameters[3].Value = model.Password; parameters[4].Value = model.Instance; parameters[5].Value = model.Port; parameters[6].Value = model.User; parameters[7].Value = model.Key; ExamSys.RunProcedure("Db_Updata", parameters, out rowsAffected); return((int)parameters[0].Value); }
/// <summary> /// 更新 /// </summary> /// <param name="model"></param> /// <returns></returns> public int Updata(Model.SystemInfo model) { int rowsAffected; SqlParameter[] parameters = { new SqlParameter("@ReturnValue", SqlDbType.Int), new SqlParameter("@HardInfo", SqlDbType.NVarChar, 500), new SqlParameter("@UserSys", SqlDbType.NVarChar, 500), new SqlParameter("@CourseSys", SqlDbType.NVarChar, 500), new SqlParameter("@sPassword", SqlDbType.NVarChar, 500), new SqlParameter("@Updata", SqlDbType.NVarChar, 500), new SqlParameter("@UpdataUserSys", SqlDbType.NVarChar, 500), new SqlParameter("@UpdataCourseSys", SqlDbType.NVarChar, 500), new SqlParameter("@UpdataHardInfo", SqlDbType.NVarChar, 500), new SqlParameter("@SN", SqlDbType.NVarChar, 500), new SqlParameter("@UpdataSN", SqlDbType.NVarChar, 500), }; parameters[0].Direction = ParameterDirection.Output; parameters[1].Value = model.HardInfo; parameters[2].Value = model.UserSys; parameters[3].Value = model.CourseSys; parameters[4].Value = model.sPassword; parameters[5].Value = model.Updata; parameters[6].Value = model.UpdataUserSys; parameters[7].Value = model.UpdataCourseSys; parameters[8].Value = model.UpdataHardInfo; parameters[9].Value = model.SN; parameters[10].Value = model.UpdataSN; ExamSys.RunProcedure("SystemInfo_Updata", parameters, out rowsAffected); return((int)parameters[0].Value); }
/// <summary> /// 添加 /// </summary> /// <param name="model"></param> /// <returns></returns> public int Add(Model.TitleList model) { int rowsAffected; SqlParameter[] parameters = { new SqlParameter("@ReturnValue", SqlDbType.Int), new SqlParameter("@CourseID", SqlDbType.Int), new SqlParameter("@Type", SqlDbType.NVarChar, 50), new SqlParameter("@Title", SqlDbType.NVarChar, 500), new SqlParameter("@T_F", SqlDbType.NVarChar, 50), new SqlParameter("@Analysis", SqlDbType.Text), new SqlParameter("@Extent", SqlDbType.NVarChar, 50), new SqlParameter("@Status_id", SqlDbType.Int) }; parameters[0].Direction = ParameterDirection.Output; parameters[1].Value = model.CourseID; parameters[2].Value = model.Type; parameters[3].Value = model.Title; parameters[4].Value = model.T_F; parameters[5].Value = model.Analysis; parameters[6].Value = model.Extent; parameters[7].Value = model.Status_id; ExamSys.RunProcedure("TitleList_Add", parameters, out rowsAffected); return((int)parameters[0].Value); }
/// <summary> /// 删除TitleListID /// </summary> /// <param name="ID">所属题目ID</param> /// <returns></returns> public int Del_TitleListID(int ID) { int rowsAffected; SqlParameter[] parameters = { new SqlParameter("@ReturnValue", SqlDbType.Int), new SqlParameter("@ID", SqlDbType.Int), }; parameters[0].Direction = ParameterDirection.Output; parameters[1].Value = ID; ExamSys.RunProcedure("OptionsList_Del_TitleListID", parameters, out rowsAffected); return((int)parameters[0].Value); }
/// <summary> /// 添加 /// </summary> /// <param name="model"></param> /// <returns></returns> public int Add(Model.OptionsList model) { int rowsAffected; SqlParameter[] parameters = { new SqlParameter("@ReturnValue", SqlDbType.Int), new SqlParameter("@TitleListID", SqlDbType.Int), new SqlParameter("@Name", SqlDbType.NVarChar,500), new SqlParameter("@T_F", SqlDbType.NVarChar, 50), }; parameters[0].Direction = ParameterDirection.Output; parameters[1].Value = model.TitleListID; parameters[2].Value = model.Name; parameters[3].Value = model.T_F; ExamSys.RunProcedure("OptionsList_Add", parameters, out rowsAffected); return((int)parameters[0].Value); }
/// <summary> /// 更新 /// </summary> /// <param name="model"></param> /// <returns></returns> public int Updata(Model.Papers model) { int rowsAffected; SqlParameter[] parameters = { new SqlParameter("@ReturnValue", SqlDbType.Int), new SqlParameter("@Lock", SqlDbType.Int), new SqlParameter("@Name", SqlDbType.NVarChar,50), new SqlParameter("@ID", SqlDbType.Int), }; parameters[0].Direction = ParameterDirection.Output; parameters[1].Value = model.Lock; parameters[2].Value = model.Name; parameters[3].Value = model.ID; ExamSys.RunProcedure("Papers_Updata", parameters, out rowsAffected); return((int)parameters[0].Value); }
/// <summary> /// 添加 /// </summary> /// <param name="model"></param> /// <returns></returns> public int Add(Model.Results model) { int rowsAffected; SqlParameter[] parameters = { new SqlParameter("@ReturnValue", SqlDbType.Int), new SqlParameter("@UserID", SqlDbType.Int), new SqlParameter("@PapersID", SqlDbType.Int), new SqlParameter("@TitleListID", SqlDbType.Int), new SqlParameter("@Answer", SqlDbType.NVarChar,50), new SqlParameter("@Time", SqlDbType.NVarChar, 50) }; parameters[0].Direction = ParameterDirection.Output; parameters[1].Value = model.UserID; parameters[2].Value = model.PapersID; parameters[3].Value = model.TitleListID; parameters[4].Value = model.Answer; parameters[5].Value = model.Time; ExamSys.RunProcedure("Results_Add", parameters, out rowsAffected); return((int)parameters[0].Value); }
/// <summary> /// 更新 /// </summary> /// <param name="model"></param> /// <returns></returns> public int Updata(Model.HardInfo model) { int rowsAffected; SqlParameter[] parameters = { new SqlParameter("@ReturnValue", SqlDbType.Int), new SqlParameter("@HostName", SqlDbType.NVarChar, 500), new SqlParameter("@CpuID", SqlDbType.NVarChar, 500), new SqlParameter("@HardDiskID", SqlDbType.NVarChar, 500), new SqlParameter("@NetCardMAC", SqlDbType.NVarChar, 500), new SqlParameter("@VolOf", SqlDbType.NVarChar, 500), new SqlParameter("@NetCardIP", SqlDbType.NVarChar, 500), }; parameters[0].Direction = ParameterDirection.Output; parameters[1].Value = model.HostName; parameters[2].Value = model.CpuID; parameters[3].Value = model.HardDiskID; parameters[4].Value = model.NetCardMAC; parameters[5].Value = model.VolOf; parameters[6].Value = model.NetCardIP; ExamSys.RunProcedure("HardInfo_Updata", parameters, out rowsAffected); return((int)parameters[0].Value); }