/// <summary> /// 增加一条数据 /// </summary> public bool Add(DSJL.Model.TB_StandardInfo model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into TB_StandardInfo("); strSql.Append("Stand_Name,Stand_Date,Stand_Remark,Stand_Level,Stand_ParentID)"); strSql.Append(" values ("); strSql.Append("@Stand_Name,@Stand_Date,@Stand_Remark,@Stand_Level,@Stand_ParentID)"); OleDbParameter[] parameters = { new OleDbParameter("@Stand_Name", OleDbType.VarChar,255), new OleDbParameter("@Stand_Date", OleDbType.VarChar,255), new OleDbParameter("@Stand_Remark", OleDbType.VarChar,255), new OleDbParameter("@Stand_Level", OleDbType.Integer,4), new OleDbParameter("@Stand_ParentID", OleDbType.Integer,4)}; parameters[0].Value = model.Stand_Name; parameters[1].Value = model.Stand_Date; parameters[2].Value = model.Stand_Remark; parameters[3].Value = model.Stand_Level; parameters[4].Value = model.Stand_ParentID; int rows=DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// ����һ������ /// </summary> public void Add(DSJL.Model.TB_TestInfo model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into TB_TestInfo("); strSql.Append("Ath_ID,TestDate,TestTime,Joint_Side,Test_Mode,Joint,Plane,Motion_Start,Motion_End,Speed1,Speed2,Acceleration1,Acceleration2,Break,NOOfSets,NOOfRepetitions,InsuredSide,Gravitycomp,Therapist,BaseFileName,DataFileName,Remark,ActionID)"); strSql.Append(" values ("); strSql.Append("OLEDBAth_ID,OLEDBTestDate,OLEDBTestTime,OLEDBJoint_Side,OLEDBTest_Mode,OLEDBJoint,OLEDBPlane,OLEDBMotion_Start,OLEDBMotion_End,OLEDBSpeed1,OLEDBSpeed2,OLEDBAcceleration1,OLEDBAcceleration2,OLEDBBreak,OLEDBNOOfSets,OLEDBNOOfRepetitions,OLEDBInsuredSide,OLEDBGravitycomp,OLEDBTherapist,OLEDBBaseFileName,OLEDBDataFileName,OLEDBRemark,OLEDBActionID)"); OleDbParameter[] parameters = { new OleDbParameter("OLEDBAth_ID", OleDbType.Integer,4), new OleDbParameter("OLEDBTestDate", OleDbType.Date), new OleDbParameter("OLEDBTestTime", OleDbType.Date), new OleDbParameter("OLEDBJoint_Side", OleDbType.VarChar,255), new OleDbParameter("OLEDBTest_Mode", OleDbType.VarChar,255), new OleDbParameter("OLEDBJoint", OleDbType.VarChar,255), new OleDbParameter("OLEDBPlane", OleDbType.VarChar,255), new OleDbParameter("OLEDBMotion_Start", OleDbType.VarChar,255), new OleDbParameter("OLEDBMotion_End", OleDbType.VarChar,255), new OleDbParameter("OLEDBSpeed1", OleDbType.VarChar,255), new OleDbParameter("OLEDBSpeed2", OleDbType.VarChar,255), new OleDbParameter("OLEDBAcceleration1", OleDbType.VarChar,255), new OleDbParameter("OLEDBAcceleration2", OleDbType.VarChar,255), new OleDbParameter("OLEDBBreak", OleDbType.VarChar,255), new OleDbParameter("OLEDBNOOfSets", OleDbType.VarChar,255), new OleDbParameter("OLEDBNOOfRepetitions", OleDbType.VarChar,255), new OleDbParameter("OLEDBInsuredSide", OleDbType.VarChar,255), new OleDbParameter("OLEDBGravitycomp", OleDbType.VarChar,255), new OleDbParameter("OLEDBTherapist", OleDbType.VarChar,255), new OleDbParameter("OLEDBBaseFileName", OleDbType.VarChar,255), new OleDbParameter("OLEDBDataFileName", OleDbType.VarChar,255), new OleDbParameter("OLEDBRemark", OleDbType.VarChar,255), new OleDbParameter("OLEDBActionID", OleDbType.VarChar,255)}; parameters[0].Value = model.Ath_ID; parameters[1].Value = model.TestDate; parameters[2].Value = model.TestTime; parameters[3].Value = model.Joint_Side; parameters[4].Value = model.Test_Mode; parameters[5].Value = model.Joint; parameters[6].Value = model.Plane; parameters[7].Value = model.Motion_Start; parameters[8].Value = model.Motion_End; parameters[9].Value = model.Speed1; parameters[10].Value = model.Speed2; parameters[11].Value = model.Acceleration1; parameters[12].Value = model.Acceleration2; parameters[13].Value = model.Break; parameters[14].Value = model.NOOfSets; parameters[15].Value = model.NOOfRepetitions; parameters[16].Value = model.InsuredSide; parameters[17].Value = model.Gravitycomp; parameters[18].Value = model.Therapist; parameters[19].Value = model.BaseFileName; parameters[20].Value = model.DataFileName; parameters[21].Value = model.Remark; parameters[22].Value = model.ActionID; DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(DSJL.Model.TB_StandTestRefe model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into TB_StandTestRefe("); strSql.Append("StandID,TestID)"); strSql.Append(" values ("); strSql.Append("OLEDBStandID,OLEDBTestID)"); OleDbParameter[] parameters = { new OleDbParameter("OLEDBStandID", OleDbType.Integer,4), new OleDbParameter("OLEDBTestID", OleDbType.Integer,4)}; parameters[0].Value = model.StandID; parameters[1].Value = model.TestID; DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(DSJL.Model.TB_Setting model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into TB_Setting("); strSql.Append("SetName,SetValue)"); strSql.Append(" values ("); strSql.Append("OLEDBSetName,OLEDBSetValue)"); OleDbParameter[] parameters = { new OleDbParameter("OLEDBSetName", OleDbType.VarChar,255), new OleDbParameter("OLEDBSetValue", OleDbType.VarChar,255)}; parameters[0].Value = model.SetName; parameters[1].Value = model.SetValue; DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(DSJL.Model.TB_AdminInfo model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into TB_AdminInfo("); strSql.Append("AdminName,AdminPwd)"); strSql.Append(" values ("); strSql.Append("OLEDBAdminName,OLEDBAdminPwd)"); OleDbParameter[] parameters = { new OleDbParameter("OLEDBAdminName", OleDbType.VarChar,255), new OleDbParameter("OLEDBAdminPwd", OleDbType.VarChar,255)}; parameters[0].Value = model.AdminName; parameters[1].Value = model.AdminPwd; DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(DSJL.Model.TB_AthleteInfo model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into TB_AthleteInfo("); strSql.Append("Ath_Code,Ath_Name,Ath_PinYin,Ath_Sex,Ath_Birthday,Ath_Height,Ath_Weight,Ath_Project,Ath_MainProject,Ath_TrainYears,Ath_Level,Ath_Team,Ath_TestDate,Ath_TestAddress,Ath_TestMachine,Ath_TestState,Ath_Remark,Ath_TestID)"); strSql.Append(" values ("); strSql.Append("OLEDBAth_Code,OLEDBAth_Name,OLEDBAth_PinYin,OLEDBAth_Sex,OLEDBAth_Birthday,OLEDBAth_Height,OLEDBAth_Weight,OLEDBAth_Project,OLEDBAth_MainProject,OLEDBAth_TrainYears,OLEDBAth_Level,OLEDBAth_Team,OLEDBAth_TestDate,OLEDBAth_TestAddress,OLEDBAth_TestMachine,OLEDBAth_TestState,OLEDBAth_Remark,OLEDBAth_TestID)"); OleDbParameter[] parameters = { new OleDbParameter("OLEDBAth_Code", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Name", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_PinYin", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Sex", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Birthday", OleDbType.Date), new OleDbParameter("OLEDBAth_Height", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Weight", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Project", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_MainProject", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_TrainYears", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Level", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Team", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_TestDate", OleDbType.Date), new OleDbParameter("OLEDBAth_TestAddress", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_TestMachine", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_TestState", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Remark", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_TestID", OleDbType.Integer,4)}; parameters[0].Value = model.Ath_Code; parameters[1].Value = model.Ath_Name; parameters[2].Value = model.Ath_PinYin; parameters[3].Value = model.Ath_Sex; parameters[4].Value = model.Ath_Birthday; parameters[5].Value = model.Ath_Height; parameters[6].Value = model.Ath_Weight; parameters[7].Value = model.Ath_Project; parameters[8].Value = model.Ath_MainProject; parameters[9].Value = model.Ath_TrainYears; parameters[10].Value = model.Ath_Level; parameters[11].Value = model.Ath_Team; parameters[12].Value = model.Ath_TestDate; parameters[13].Value = model.Ath_TestAddress; parameters[14].Value = model.Ath_TestMachine; parameters[15].Value = model.Ath_TestState; parameters[16].Value = model.Ath_Remark; parameters[17].Value = model.Ath_TestID; DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(DSJL.Model.TB_BackupInfo model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into TB_BackupInfo("); strSql.Append("BackupName,BackupPath,BackupDate)"); strSql.Append(" values ("); strSql.Append("OLEDBBackupName,OLEDBBackupPath,OLEDBBackupDate)"); OleDbParameter[] parameters = { new OleDbParameter("OLEDBBackupName", OleDbType.VarChar,255), new OleDbParameter("OLEDBBackupPath", OleDbType.VarChar,255), new OleDbParameter("OLEDBBackupDate", OleDbType.VarChar,255)}; parameters[0].Value = model.BackupName; parameters[1].Value = model.BackupPath; parameters[2].Value = model.BackupDate; DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(DSJL.Model.TB_StandardParams model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into TB_StandardParams("); strSql.Append("StandID,StandName,Ath_Sex,Ath_AgeMinLimit,Ath_AgeMaxLimit,Ath_Project,Ath_MainProject,Joint_Side,Test_Mode,Joint,Plane,Speed1,Speed2)"); strSql.Append(" values ("); strSql.Append("@StandID,@StandName,@Ath_Sex,@Ath_AgeMinLimit,@Ath_AgeMaxLimit,@Ath_Project,@Ath_MainProject,@Joint_Side,@Test_Mode,@Joint,@Plane,@Speed1,@Speed2)"); OleDbParameter[] parameters = { new OleDbParameter("@StandID", OleDbType.Integer,4), new OleDbParameter("@StandName", OleDbType.VarChar,255), new OleDbParameter("@Ath_Sex", OleDbType.VarChar,255), new OleDbParameter("@Ath_AgeMinLimit", OleDbType.Integer,4), new OleDbParameter("@Ath_AgeMaxLimit", OleDbType.Integer,4), new OleDbParameter("@Ath_Project", OleDbType.VarChar,255), new OleDbParameter("@Ath_MainProject", OleDbType.VarChar,255), new OleDbParameter("@Joint_Side", OleDbType.VarChar,255), new OleDbParameter("@Test_Mode", OleDbType.VarChar,255), new OleDbParameter("@Joint", OleDbType.VarChar,255), new OleDbParameter("@Plane", OleDbType.VarChar,255), new OleDbParameter("@Speed1", OleDbType.VarChar,255), new OleDbParameter("@Speed2", OleDbType.VarChar,255)}; parameters[0].Value = model.StandID; parameters[1].Value = model.StandName; parameters[2].Value = model.Ath_Sex; parameters[3].Value = model.Ath_AgeMinLimit; parameters[4].Value = model.Ath_AgeMaxLimit; parameters[5].Value = model.Ath_Project; parameters[6].Value = model.Ath_MainProject; parameters[7].Value = model.Joint_Side; parameters[8].Value = model.Test_Mode; parameters[9].Value = model.Joint; parameters[10].Value = model.Plane; parameters[11].Value = model.Speed1; parameters[12].Value = model.Speed2; int rows=DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// ����һ������ /// </summary> public void Add(DSJL.Model.TB_TestManager model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into TB_TestManager("); strSql.Append("TestName,TestStartDate,TestEndDate,Remark)"); strSql.Append(" values ("); strSql.Append("OLEDBTestName,OLEDBTestStartDate,OLEDBTestEndDate,OLEDBRemark)"); OleDbParameter[] parameters = { new OleDbParameter("OLEDBTestName", OleDbType.VarChar,255), new OleDbParameter("OLEDBTestStartDate", OleDbType.VarChar,255), new OleDbParameter("OLEDBTestEndDate", OleDbType.VarChar,255), new OleDbParameter("OLEDBRemark", OleDbType.VarChar,255)}; parameters[0].Value = model.TestName; parameters[1].Value = model.TestStartDate; parameters[2].Value = model.TestEndDate; parameters[3].Value = model.Remark; DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// ����һ������ /// </summary> public void Add(DSJL.Model.TB_Dict model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into TB_Dict("); strSql.Append("Dict_GroupID,Dict_Value,Dict_Key,actionone,actiontwo)"); strSql.Append(" values ("); strSql.Append("OLEDBDict_GroupID,OLEDBDict_Value,OLEDBDict_Key,OLEDBactionone,OLEDBactiontwo)"); OleDbParameter[] parameters = { new OleDbParameter("OLEDBDict_GroupID", OleDbType.Integer,4), new OleDbParameter("OLEDBDict_Value", OleDbType.VarChar,255), new OleDbParameter("OLEDBDict_Key", OleDbType.VarChar,255), new OleDbParameter("OLEDBactionone", OleDbType.VarChar,255), new OleDbParameter("OLEDBactiontwo", OleDbType.VarChar,255)}; parameters[0].Value = model.Dict_GroupID; parameters[1].Value = model.Dict_Value; parameters[2].Value = model.Dict_Key; parameters[3].Value = model.actionone; parameters[4].Value = model.actiontwo; DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(DSJL.Model.TB_DBVersion model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into TB_DBVersion("); strSql.Append("versioncode)"); strSql.Append(" values ("); strSql.Append("@versioncode)"); OleDbParameter[] parameters = { new OleDbParameter("@versioncode", OleDbType.Integer,4)}; parameters[0].Value = model.versioncode; int rows=DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// ����һ������ /// </summary> public int Add(DSJL.Model.TB_AthleteInfo model,out string existID) { existID = ""; //1.��֤�Ƿ����ظ����룬�ֶ� �������Ա𣬳������ڣ��������� DataSet ds = dal.GetList("ath_name='" + model.Ath_Name + "' and ath_sex='" + model.Ath_Sex + "' and DateDiff('d',ath_birthday,#" + ((DateTime)model.Ath_Birthday).ToString("yyyy-MM-dd") + "#)=0 and DateDiff('d',ath_testdate,#" + ((DateTime)model.Ath_TestDate).ToString("yyyy-MM-dd") + "#)=0"); if (ds.Tables[0].Rows.Count > 0) { existID = ds.Tables[0].Rows[0]["ID"].ToString(); return RepeatAdd; } //2.��֤�Ƿ��д�����Ϣ���ֶΣ��������Ա𣬳������� ds = dal.GetList("ath_name='" + model.Ath_Name + "' and ath_sex='" + model.Ath_Sex + "' and DateDiff('d',ath_birthday,#" + ((DateTime)model.Ath_Birthday).ToString("yyyy-MM-dd") + "#)=0"); if (ds.Tables[0].Rows.Count > 0) { model.Ath_Code = ds.Tables[0].Rows[0]["ath_code"].ToString(); } else { ds = dal.GetList("ath_testid=" + model.Ath_TestID,""); if (ds.Tables[0].Rows.Count > 0) { string maxCode = ds.Tables[0].Rows[0]["ath_code"].ToString(); int code = int.Parse(maxCode.Substring(maxCode.Length - 5)); model.Ath_Code = DateTime.Now.ToString("yyyyMM") + model.Ath_TestID.ToString("00") + (code + 1).ToString("00000"); } else { model.Ath_Code = DateTime.Now.ToString("yyyyMM") + model.Ath_TestID.ToString("00") + "00001"; } } try { dal.Add(model); } catch(Exception ee) { throw ee; } return Success; }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(DSJL.Model.TB_DBVersion model) { StringBuilder strSql=new StringBuilder(); strSql.Append("update TB_DBVersion set "); strSql.Append("versioncode=@versioncode"); strSql.Append(" where ID=@ID"); OleDbParameter[] parameters = { new OleDbParameter("@versioncode", OleDbType.Integer,4), new OleDbParameter("@ID", OleDbType.Integer,4)}; parameters[0].Value = model.versioncode; parameters[1].Value = model.ID; int rows=DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(DSJL.Model.TB_StandardInfo model) { StringBuilder strSql=new StringBuilder(); strSql.Append("update TB_StandardInfo set "); strSql.Append("Stand_Name=@Stand_Name,"); strSql.Append("Stand_Date=@Stand_Date,"); strSql.Append("Stand_Remark=@Stand_Remark,"); strSql.Append("Stand_Level=@Stand_Level,"); strSql.Append("Stand_ParentID=@Stand_ParentID"); strSql.Append(" where ID=@ID"); OleDbParameter[] parameters = { new OleDbParameter("@Stand_Name", OleDbType.VarChar,255), new OleDbParameter("@Stand_Date", OleDbType.VarChar,255), new OleDbParameter("@Stand_Remark", OleDbType.VarChar,255), new OleDbParameter("@Stand_Level", OleDbType.Integer,4), new OleDbParameter("@Stand_ParentID", OleDbType.Integer,4), new OleDbParameter("@ID", OleDbType.Integer,4)}; parameters[0].Value = model.Stand_Name; parameters[1].Value = model.Stand_Date; parameters[2].Value = model.Stand_Remark; parameters[3].Value = model.Stand_Level; parameters[4].Value = model.Stand_ParentID; parameters[5].Value = model.ID; int rows=DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(DSJL.Model.TB_DBVersion model) { return dal.Add(model); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(DSJL.Model.TB_DBVersion model) { return dal.Update(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(DSJL.Model.TB_AdminInfo model) { return dal.Update(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(DSJL.Model.TB_TestManager model) { StringBuilder strSql=new StringBuilder(); strSql.Append("update TB_TestManager set "); strSql.Append("TestName=OLEDBTestName,"); strSql.Append("TestStartDate=OLEDBTestStartDate,"); strSql.Append("TestEndDate=OLEDBTestEndDate,"); strSql.Append("Remark=OLEDBRemark"); strSql.Append(" where ID=OLEDBID"); OleDbParameter[] parameters = { new OleDbParameter("OLEDBTestName", OleDbType.VarChar,255), new OleDbParameter("OLEDBTestStartDate", OleDbType.VarChar,255), new OleDbParameter("OLEDBTestEndDate", OleDbType.VarChar,255), new OleDbParameter("OLEDBRemark", OleDbType.VarChar,255), new OleDbParameter("OLEDBID", OleDbType.Integer,4)}; parameters[0].Value = model.TestName; parameters[1].Value = model.TestStartDate; parameters[2].Value = model.TestEndDate; parameters[3].Value = model.Remark; parameters[4].Value = model.ID; int rows=DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// ����һ������ /// </summary> public void Add(DSJL.Model.TB_StandTestRefe model) { dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(DSJL.Model.TB_AthleteInfo model) { StringBuilder strSql=new StringBuilder(); strSql.Append("update TB_AthleteInfo set "); strSql.Append("Ath_Code=OLEDBAth_Code,"); strSql.Append("Ath_Name=OLEDBAth_Name,"); strSql.Append("Ath_PinYin=OLEDBAth_PinYin,"); strSql.Append("Ath_Sex=OLEDBAth_Sex,"); strSql.Append("Ath_Birthday=OLEDBAth_Birthday,"); strSql.Append("Ath_Height=OLEDBAth_Height,"); strSql.Append("Ath_Weight=OLEDBAth_Weight,"); strSql.Append("Ath_Project=OLEDBAth_Project,"); strSql.Append("Ath_MainProject=OLEDBAth_MainProject,"); strSql.Append("Ath_TrainYears=OLEDBAth_TrainYears,"); strSql.Append("Ath_Level=OLEDBAth_Level,"); strSql.Append("Ath_Team=OLEDBAth_Team,"); strSql.Append("Ath_TestDate=OLEDBAth_TestDate,"); strSql.Append("Ath_TestAddress=OLEDBAth_TestAddress,"); strSql.Append("Ath_TestMachine=OLEDBAth_TestMachine,"); strSql.Append("Ath_TestState=OLEDBAth_TestState,"); strSql.Append("Ath_Remark=OLEDBAth_Remark,"); strSql.Append("Ath_TestID=OLEDBAth_TestID"); strSql.Append(" where ID=OLEDBID"); OleDbParameter[] parameters = { new OleDbParameter("OLEDBAth_Code", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Name", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_PinYin", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Sex", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Birthday", OleDbType.Date), new OleDbParameter("OLEDBAth_Height", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Weight", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Project", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_MainProject", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_TrainYears", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Level", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Team", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_TestDate", OleDbType.Date), new OleDbParameter("OLEDBAth_TestAddress", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_TestMachine", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_TestState", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_Remark", OleDbType.VarChar,255), new OleDbParameter("OLEDBAth_TestID", OleDbType.Integer,4), new OleDbParameter("OLEDBID", OleDbType.Integer,4)}; parameters[0].Value = model.Ath_Code; parameters[1].Value = model.Ath_Name; parameters[2].Value = model.Ath_PinYin; parameters[3].Value = model.Ath_Sex; parameters[4].Value = model.Ath_Birthday; parameters[5].Value = model.Ath_Height; parameters[6].Value = model.Ath_Weight; parameters[7].Value = model.Ath_Project; parameters[8].Value = model.Ath_MainProject; parameters[9].Value = model.Ath_TrainYears; parameters[10].Value = model.Ath_Level; parameters[11].Value = model.Ath_Team; parameters[12].Value = model.Ath_TestDate; parameters[13].Value = model.Ath_TestAddress; parameters[14].Value = model.Ath_TestMachine; parameters[15].Value = model.Ath_TestState; parameters[16].Value = model.Ath_Remark; parameters[17].Value = model.Ath_TestID; parameters[18].Value = model.ID; int rows=DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// ����һ������ /// </summary> public bool Update(DSJL.Model.TB_TestManager model) { return dal.Update(model); }
/// <summary> /// ����һ������ /// </summary> public void Add(DSJL.Model.TB_AdminInfo model) { dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(DSJL.Model.TB_Dict model) { return dal.Update(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(DSJL.Model.TB_Setting model) { StringBuilder strSql=new StringBuilder(); strSql.Append("update TB_Setting set "); strSql.Append("SetName=OLEDBSetName,"); strSql.Append("SetValue=OLEDBSetValue"); strSql.Append(" where ID=OLEDBID"); OleDbParameter[] parameters = { new OleDbParameter("OLEDBSetName", OleDbType.VarChar,255), new OleDbParameter("OLEDBSetValue", OleDbType.VarChar,255), new OleDbParameter("OLEDBID", OleDbType.Integer,4)}; parameters[0].Value = model.SetName; parameters[1].Value = model.SetValue; parameters[2].Value = model.ID; int rows=DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// ����һ������ /// </summary> public void Add(DSJL.Model.TB_Dict model) { dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(DSJL.Model.TB_StandTestRefe model) { return dal.Update(model); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(DSJL.Model.TB_StandardParams model) { StringBuilder strSql=new StringBuilder(); strSql.Append("update TB_StandardParams set "); strSql.Append("StandID=@StandID,"); strSql.Append("StandName=@StandName,"); strSql.Append("Ath_Sex=@Ath_Sex,"); strSql.Append("Ath_AgeMinLimit=@Ath_AgeMinLimit,"); strSql.Append("Ath_AgeMaxLimit=@Ath_AgeMaxLimit,"); strSql.Append("Ath_Project=@Ath_Project,"); strSql.Append("Ath_MainProject=@Ath_MainProject,"); strSql.Append("Joint_Side=@Joint_Side,"); strSql.Append("Test_Mode=@Test_Mode,"); strSql.Append("Joint=@Joint,"); strSql.Append("Plane=@Plane,"); strSql.Append("Speed1=@Speed1,"); strSql.Append("Speed2=@Speed2"); strSql.Append(" where ID=@ID"); OleDbParameter[] parameters = { new OleDbParameter("@StandID", OleDbType.Integer,4), new OleDbParameter("@StandName", OleDbType.VarChar,255), new OleDbParameter("@Ath_Sex", OleDbType.VarChar,255), new OleDbParameter("@Ath_AgeMinLimit", OleDbType.Integer,4), new OleDbParameter("@Ath_AgeMaxLimit", OleDbType.Integer,4), new OleDbParameter("@Ath_Project", OleDbType.VarChar,255), new OleDbParameter("@Ath_MainProject", OleDbType.VarChar,255), new OleDbParameter("@Joint_Side", OleDbType.VarChar,255), new OleDbParameter("@Test_Mode", OleDbType.VarChar,255), new OleDbParameter("@Joint", OleDbType.VarChar,255), new OleDbParameter("@Plane", OleDbType.VarChar,255), new OleDbParameter("@Speed1", OleDbType.VarChar,255), new OleDbParameter("@Speed2", OleDbType.VarChar,255), new OleDbParameter("@ID", OleDbType.Integer,4)}; parameters[0].Value = model.StandID; parameters[1].Value = model.StandName; parameters[2].Value = model.Ath_Sex; parameters[3].Value = model.Ath_AgeMinLimit; parameters[4].Value = model.Ath_AgeMaxLimit; parameters[5].Value = model.Ath_Project; parameters[6].Value = model.Ath_MainProject; parameters[7].Value = model.Joint_Side; parameters[8].Value = model.Test_Mode; parameters[9].Value = model.Joint; parameters[10].Value = model.Plane; parameters[11].Value = model.Speed1; parameters[12].Value = model.Speed2; parameters[13].Value = model.ID; int rows=DbHelperOleDb.ExecuteSql(strSql.ToString(),parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// ����һ������ /// </summary> public void Add(DSJL.Model.TB_Setting model) { dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public void Add(DSJL.Model.TB_TestManager model) { dal.Add(model); }
/// <summary> /// ����һ������ /// </summary> public bool Update(DSJL.Model.TB_Setting model) { return dal.Update(model); }