/// <summary> /// 删除记录信息 /// </summary> /// <param name="Model"></param> /// <returns></returns> public int DeleteCompanyRecord(string Id) { StringBuilder sql = new StringBuilder(); sql.Append("Delete From [" + ShopMssqlHelper.TablePrefix + "CompanyRecord] Where Id in (" + Id + ")"); return(DbSQLHelper.ExecuteSql(sql.ToString())); }
public void DeleteCourseByCatId(int Id) { StringBuilder sql = new StringBuilder(); sql.Append("Delete from [" + ShopMssqlHelper.TablePrefix + "Course] where CateId=" + Id); DbSQLHelper.ExecuteSql(sql.ToString()); }
public void UpdateQuestionChecked(string Id, string Value) { StringBuilder sql = new StringBuilder(); sql.Append("Update [" + ShopMssqlHelper.TablePrefix + "Question] set Checked=" + Value + " where QuestionId in (" + Id + ")"); DbSQLHelper.ExecuteSql(sql.ToString()); }
/// <summary> /// 通过课程ID删除考题 /// </summary> /// <param name="Id"></param> public void DeleteQuestionByCateId(int CateId) { StringBuilder sql = new StringBuilder(); sql.Append("Delete from [" + ShopMssqlHelper.TablePrefix + "Question] where CateId=" + CateId); DbSQLHelper.ExecuteSql(sql.ToString()); }
public void UpdateCourse(string courseID, int parentID) { StringBuilder sql = new StringBuilder(); sql.Append("Update [" + ShopMssqlHelper.TablePrefix + "Course] Set [CateId]=" + parentID + " Where [CourseId] in (" + courseID + ")"); DbSQLHelper.ExecuteSql(sql.ToString()); }
/// <summary> /// 更新记录信息 /// </summary> /// <param name="Model"></param> /// <returns></returns> public int UpdateCompanyPostPlan(CompanyPostPlanInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("update [" + ShopMssqlHelper.TablePrefix + "CompanyPostPlan] set StartDate=" + Model.StartDate + ",PostId=" + Model.PostId); return(DbSQLHelper.ExecuteSql(sql.ToString())); }
public void DeleteCompany(int Id) { StringBuilder sql = new StringBuilder(); sql.Append("delete from [" + ShopMssqlHelper.TablePrefix + "Company] where [CompanyId]=" + Id); DbSQLHelper.ExecuteSql(sql.ToString()); }
public void UpdateCompany(string Field, string Value, string Id) { StringBuilder sql = new StringBuilder(); sql.Append("update [" + ShopMssqlHelper.TablePrefix + "Company] set [" + Field + "]=" + Value + " where [CompanyId] in (" + Id + ")"); DbSQLHelper.ExecuteSql(sql.ToString()); }
public void DeleteQuestion(string IdStr) { StringBuilder sql = new StringBuilder(); sql.Append("Delete from [" + ShopMssqlHelper.TablePrefix + "Question] where QuestionId in (" + IdStr + ")"); DbSQLHelper.ExecuteSql(sql.ToString()); }
/// <summary> /// 更新记录信息 /// </summary> /// <param name="Model"></param> /// <returns></returns> public int UpdateCompanyRule(CompanyRuleInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("update CompanyRule set CourseNum=" + Model.CourseNum + ",Frequency=" + Model.Frequency + ",StartDate=" + Model.StartDate + ",EndDate=" + Model.EndDate + ",PostId=" + Model.PostId); return(DbSQLHelper.ExecuteSql(sql.ToString())); }
public void UpdatePaperCompanyId(int UserId, int CompanyId) { StringBuilder sql = new StringBuilder(); sql.Append("Update [" + ShopMssqlHelper.TablePrefix + "TestPaper] set CompanyId=" + CompanyId + " where UserId=" + UserId); DbSQLHelper.ExecuteSql(sql.ToString()); }
public void DeleteTestSetting(int Id) { StringBuilder sql = new StringBuilder(); sql.Append("Delete from [" + ShopMssqlHelper.TablePrefix + "TestSetting] where Id=" + Id); DbSQLHelper.ExecuteSql(sql.ToString()); }
/// <summary> /// 删除记录信息 /// </summary> /// <param name="Model"></param> /// <returns></returns> public int DeleteCompanyRule(string Id) { StringBuilder sql = new StringBuilder(); sql.Append("Delete From CompanyRule Where Id in (" + Id + ")"); return(DbSQLHelper.ExecuteSql(sql.ToString())); }
public void UpdateIsRZ(PostPassInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("Update [" + ShopMssqlHelper.TablePrefix + "PassPost] set [CreateDate]='" + DateTime.Now + "',[IsRZ]=" + Model.IsRZ + " where [UserId]=" + Model.UserId + " and [PostId]=" + Model.PostId); DbSQLHelper.ExecuteSql(sql.ToString()); }
/// <summary> /// 更新记录信息 /// </summary> /// <param name="Model"></param> /// <returns></returns> public int UpdateCompanyRecord(CompanyRecordInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("update [" + ShopMssqlHelper.TablePrefix + "CompanyRecord] set ChangeNum=" + Model.ChangeNum + ",Reason=" + Model.Reason + ",PostId=" + Model.PostId); return(DbSQLHelper.ExecuteSql(sql.ToString())); }
public void DeletePost(int Id) { StringBuilder sql = new StringBuilder(); sql.Append("Delete from [" + ShopMssqlHelper.TablePrefix + "Post] where [PostId]=" + Id); DbSQLHelper.ExecuteSql(sql.ToString()); }
public int AddSMSRecord(SMSRecordInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("insert into [" + ShopMssqlHelper.TablePrefix + "SMSRecord]([Mobile],[VerCode],[DataCreateDate]) values(@Mobile,@VerCode,@DataCreateDate)"); SqlParameter[] par = (SqlParameter[])this.ValueParas(Model); return(DbSQLHelper.ExecuteSql(sql.ToString(), par)); }
/// <summary> /// /// </summary> /// <param name="Id"></param> public void DeletePaper(int Id) { StringBuilder sql = new StringBuilder(); //sql.Append("Delete from [" + ShopMssqlHelper.TablePrefix + "TestPaper] where TestPaperId=" + Id); sql.Append("Update [" + ShopMssqlHelper.TablePrefix + "TestPaper] Set [Del]=1 where TestPaperId=" + Id); DbSQLHelper.ExecuteSql(sql.ToString()); }
public void UpdatePaper(TestPaperInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("Update [" + ShopMssqlHelper.TablePrefix + "TestPaper] set PaperName=@PaperName,CateId=@CateId,QuestionStyle=@QuestionStyle,QuestionId=@QuestionId,Answer=@Answer,Locked=@Locked,CompanyId=@CompanyId,UserId=@UserId,Scorse=@Scorse,Point=@Point,[IsPass]=@IsPass where TestPaperId=@TestPaperId"); SqlParameter[] par = (SqlParameter[])this.ValueParas(Model); DbSQLHelper.ExecuteSql(sql.ToString(), par); }
public void UpdateTestSetting(TestSettingInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("Update [" + ShopMssqlHelper.TablePrefix + "TestSetting] set [CourseId]=@courseId,[PaperScore]=@paperScore,[TestQuestionsCount]=@testQuestionsCount,[TestTimeLength]=@testTimeLength,[LowScore]=@lowScore,[TestStartTime]=@testStartTime,[TestEndTime]=@testEndTime,[CompanyId]=@companyId,[TestInterval]=@testInterval where [Id]=@id"); SqlParameter[] par = (SqlParameter[])this.ValueParas(Model); DbSQLHelper.ExecuteSql(sql.ToString(), par); }
public void UpdateCompany(CompanyInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("update [" + ShopMssqlHelper.TablePrefix + "Company] set [CompanyName]=@CompanyName,[CompanySimpleName]=@CompanySimpleName,[CompanyAddress]=@CompanyAddress,[CompanyTel]=@CompanyTel,[CompanyPost]=@CompanyPost,[BrandId]=@BrandId,[GroupId]=@GroupId,[State]=@State,[ParentId]=@ParentId,[PostStartDate]=@PostStartDate,[Sort]=@Sort,[UserNum]=@UserNum,[IsTest]=@IsTest,[EndDate]=@EndDate,[Post]=@Post where [CompanyId]=@CompanyId"); SqlParameter[] par = (SqlParameter[])this.ValueParas(Model); DbSQLHelper.ExecuteSql(sql.ToString(), par); }
public int AddPostPassInfo(PostPassInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("Insert into [" + ShopMssqlHelper.TablePrefix + "PassPost] ([UserId],[PostId],[IsRZ],[PostName]) values(@UserId,@PostId,@IsRZ,@PostName)"); SqlParameter[] par = (SqlParameter[])this.ValueParas(Model); return(DbSQLHelper.ExecuteSql(sql.ToString(), par)); }
/// <summary> /// 添加记录信息 /// </summary> /// <param name="Model"></param> /// <returns></returns> public int AddUserRecord(ProRecordInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("insert into [" + ShopMssqlHelper.TablePrefix + "ProRecord] (UserId,ChangeNum,Reson) values(@UserId,@ChangeNum,@Reson)"); SqlParameter[] par = (SqlParameter[])this.ValueParas(Model); return(DbSQLHelper.ExecuteSql(sql.ToString(), par)); }
public void UpdatePost(PostInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("Update [" + ShopMssqlHelper.TablePrefix + "Post] set [PostName]=@PostName,[PostPlan]=@PostPlan,[ParentId]=@ParentId,[OrderIndex]=@OrderIndex,[Locked]=@Locked,[IsPost]=@IsPost,[CompanyID]=@CompanyID where [PostId]=@PostId"); SqlParameter[] par = (SqlParameter[])this.ValueParas(Model); DbSQLHelper.ExecuteSql(sql.ToString(), par); }
public void UpdatePostPassInfo(PostPassInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("Update [" + ShopMssqlHelper.TablePrefix + "PassPost] set [UserId]=@UserId,[PostId]=@PostId,[PostName]=@PostName where [Id]=@Id"); SqlParameter[] par = (SqlParameter[])this.ValueParas(Model); DbSQLHelper.ExecuteSql(sql.ToString(), par); }
public int AddCompany(CompanyInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("insert into [" + ShopMssqlHelper.TablePrefix + "Company] ( [CompanyName],[CompanySimpleName],[CompanyAddress],[CompanyTel],[CompanyPost],[BrandId],[GroupId],[State],[ParentId],[PostStartDate],[Sort],[UserNum],[IsTest],[EndDate],[Post]) values(@CompanyName,@CompanySimpleName,@CompanyAddress,@CompanyTel,@CompanyPost,@BrandId,@GroupId,@State,@ParentId,@PostStartDate,@Sort,@UserNum,@IsTest,@EndDate,@Post)"); SqlParameter[] par = (SqlParameter[])this.ValueParas(Model); return(DbSQLHelper.ExecuteSql(sql.ToString(), par)); }
public void UpdateCourse(CourseInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("Update [" + ShopMssqlHelper.TablePrefix + "Course] set CourseName=@CourseName,CourseCode=@CourseCode,CourseScore=@CourseScore,CateId=@CateId,OrderIndex=@OrderIndex,CompanyId=@CompanyId,BrandId=@BrandId where CourseId=@CourseId"); SqlParameter[] par = (SqlParameter[])this.ValueParas(Model); DbSQLHelper.ExecuteSql(sql.ToString(), par); }
public void UpdateQuestion(QuestionInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("Update [" + ShopMssqlHelper.TablePrefix + "Question] set CateId=@CateId,Style=@Style,Score=@Score,Question=@Question,A=@A,B=@B,C=@C,D=@D,Answer=@Answer,Remarks=@Remarks,Checked=@Checked,CompanyId=@CompanyId where QuestionId=@QuestionId"); SqlParameter[] par = (SqlParameter[])this.ValueParas(Model); DbSQLHelper.ExecuteSql(sql.ToString(), par); }
public int AddCompanyRule(CompanyRuleInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("insert into CompanyRule (CompanyId,CourseNum,Frequency,StartDate,EndDate,PostId) values(@CompanyId,@CourseNum,@Frequency,@StartDate,@EndDate,@PostId)"); SqlParameter[] par = (SqlParameter[])this.ValueParas(Model); return(DbSQLHelper.ExecuteSql(sql.ToString(), par)); }
public int AddCompanyPostPlan(CompanyPostPlanInfo Model) { StringBuilder sql = new StringBuilder(); sql.Append("insert into [" + ShopMssqlHelper.TablePrefix + "CompanyPostPlan] (CompanyId,StartDate,PostId) values(@CompanyId,@StartDate,@PostId)"); SqlParameter[] par = (SqlParameter[])this.ValueParas(Model); return(DbSQLHelper.ExecuteSql(sql.ToString(), par)); }