/// <summary> /// 增加一条数据 /// </summary> public bool Add(XHD.Model.crm_customer_grab model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into crm_customer_grab("); strSql.Append("pubpri_detail_Id,factory_Id,Customer_Id,Customer_name,C_createId,C_createName,C_createDate)"); strSql.Append(" values ("); strSql.Append("@pubpri_detail_Id,@factory_Id,@Customer_Id,@Customer_name,@C_createId,@C_createName,@C_createDate)"); MySqlParameter[] parameters = { new MySqlParameter("@pubpri_detail_Id", MySqlDbType.Int32, 11), new MySqlParameter("@factory_Id", MySqlDbType.VarChar, 60), new MySqlParameter("@Customer_Id", MySqlDbType.Int32, 11), new MySqlParameter("@Customer_name", MySqlDbType.VarChar, 200), new MySqlParameter("@C_createId", MySqlDbType.Int32, 11), new MySqlParameter("@C_createName", MySqlDbType.VarChar, 60), new MySqlParameter("@C_createDate", MySqlDbType.DateTime) }; parameters[0].Value = model.pubpri_detail_Id; parameters[1].Value = model.factory_Id; parameters[2].Value = model.Customer_Id; parameters[3].Value = model.Customer_name; parameters[4].Value = model.C_createId; parameters[5].Value = model.C_createName; parameters[6].Value = model.C_createDate; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(BusinessInfoViewer.Model.business model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into business("); strSql.Append("BusinessID,BusinessTitle,ReleaseCom,ReleaseLocation,ReleaseTime,DetileURL,Source)"); strSql.Append(" values ("); strSql.Append("@BusinessID,@BusinessTitle,@ReleaseCom,@ReleaseLocation,@ReleaseTime,@DetileURL,@Source)"); MySqlParameter[] parameters = { new MySqlParameter("@BusinessID", MySqlDbType.VarChar, 50), new MySqlParameter("@BusinessTitle", MySqlDbType.VarChar, 200), new MySqlParameter("@ReleaseCom", MySqlDbType.VarChar, 200), new MySqlParameter("@ReleaseLocation", MySqlDbType.VarChar, 200), new MySqlParameter("@ReleaseTime", MySqlDbType.Date), new MySqlParameter("@DetileURL", MySqlDbType.VarChar, 500), new MySqlParameter("@Source", MySqlDbType.VarChar, 50) }; parameters[0].Value = model.BusinessID; parameters[1].Value = model.BusinessTitle; parameters[2].Value = model.ReleaseCom; parameters[3].Value = model.ReleaseLocation; parameters[4].Value = model.ReleaseTime; parameters[5].Value = model.DetileURL; parameters[6].Value = model.Source; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(XHD.Model.ecs_shop_config model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into ecs_shop_config("); strSql.Append("parent_id,code,type,store_range,store_dir,value,sort_order)"); strSql.Append(" values ("); strSql.Append("@parent_id,@code,@type,@store_range,@store_dir,@value,@sort_order)"); MySqlParameter[] parameters = { new MySqlParameter("@parent_id", MySqlDbType.Int32), new MySqlParameter("@code", MySqlDbType.VarChar, 30), new MySqlParameter("@type", MySqlDbType.VarChar, 10), new MySqlParameter("@store_range", MySqlDbType.VarChar, 255), new MySqlParameter("@store_dir", MySqlDbType.VarChar, 255), new MySqlParameter("@value", MySqlDbType.Text), new MySqlParameter("@sort_order", MySqlDbType.Int32) }; parameters[0].Value = model.parent_id; parameters[1].Value = model.code; parameters[2].Value = model.type; parameters[3].Value = model.store_range; parameters[4].Value = model.store_dir; parameters[5].Value = model.value; parameters[6].Value = model.sort_order; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Maticsoft.Model.messages.messages model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into messages("); strSql.Append("type,rcvMan,unit,rcvTel,content,sendTime,status)"); strSql.Append(" values ("); strSql.Append("@type,@rcvMan,@unit,@rcvTel,@content,@sendTime,@status)"); MySqlParameter[] parameters = { new MySqlParameter("@type", MySqlDbType.VarChar, 20), new MySqlParameter("@rcvMan", MySqlDbType.VarChar, 50), new MySqlParameter("@unit", MySqlDbType.VarChar, 100), new MySqlParameter("@rcvTel", MySqlDbType.VarChar, 20), new MySqlParameter("@content", MySqlDbType.Text), new MySqlParameter("@sendTime", MySqlDbType.DateTime), new MySqlParameter("@status", MySqlDbType.VarChar, 101) }; parameters[0].Value = model.type; parameters[1].Value = model.rcvMan; parameters[2].Value = model.unit; parameters[3].Value = model.rcvTel; parameters[4].Value = model.content; parameters[5].Value = model.sendTime; parameters[6].Value = model.status; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(XHD.Model.dms_set_exclude model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into dms_set_exclude("); strSql.Append("exclude_did,exclude_dname,exclude_emp_code,exclude_emp_name,create_time,create_name,factory_id)"); strSql.Append(" values ("); strSql.Append("@exclude_did,@exclude_dname,@exclude_emp_code,@exclude_emp_name,@create_time,@create_name,@factory_id)"); MySqlParameter[] parameters = { new MySqlParameter("@exclude_did", MySqlDbType.VarChar, 50), new MySqlParameter("@exclude_dname", MySqlDbType.VarChar, 50), new MySqlParameter("@exclude_emp_code", MySqlDbType.VarChar, 50), new MySqlParameter("@exclude_emp_name", MySqlDbType.VarChar, 50), new MySqlParameter("@create_time", MySqlDbType.DateTime), new MySqlParameter("@create_name", MySqlDbType.VarChar, 20), new MySqlParameter("@factory_id", MySqlDbType.VarChar, 20) }; parameters[0].Value = model.exclude_did; parameters[1].Value = model.exclude_dname; parameters[2].Value = model.exclude_emp_code; parameters[3].Value = model.exclude_emp_name; parameters[4].Value = model.create_time; parameters[5].Value = model.create_name; parameters[6].Value = model.factory_id; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(MyBlogs.Model.Enumeration model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into enumeration("); strSql.Append("Id,EnName,CnName,Type,Remark,AddTime,IsDel)"); strSql.Append(" values ("); strSql.Append("@Id,@EnName,@CnName,@Type,@Remark,@AddTime,@IsDel)"); MySqlParameter[] parameters = { new MySqlParameter("@Id", MySqlDbType.Int32, 11), new MySqlParameter("@EnName", MySqlDbType.VarChar, 24), new MySqlParameter("@CnName", MySqlDbType.VarChar, 24), new MySqlParameter("@Type", MySqlDbType.VarChar, 24), new MySqlParameter("@Remark", MySqlDbType.VarChar, 255), new MySqlParameter("@AddTime", MySqlDbType.Timestamp), new MySqlParameter("@IsDel", MySqlDbType.Bit) }; parameters[0].Value = model.Id; parameters[1].Value = model.EnName; parameters[2].Value = model.CnName; parameters[3].Value = model.Type; parameters[4].Value = model.Remark; parameters[5].Value = model.AddTime; parameters[6].Value = model.IsDel; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Gunark.Model.admin model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into gunark_admin("); strSql.Append("ID,ADMIN_KIND,ADMIN_DUTYBEGIN,ADMIN_DUTYEND,ADMIN_STATUS,USERID,ADMIN_ID)"); strSql.Append(" values ("); strSql.Append("@ID,@ADMIN_KIND,@ADMIN_DUTYBEGIN,@ADMIN_DUTYEND,@ADMIN_STATUS,@USERID,@ADMIN_ID)"); MySqlParameter[] parameters = { new MySqlParameter("@ID", MySqlDbType.VarChar, 255), new MySqlParameter("@ADMIN_KIND", MySqlDbType.VarChar, 10), new MySqlParameter("@ADMIN_DUTYBEGIN", MySqlDbType.VarChar, 255), new MySqlParameter("@ADMIN_DUTYEND", MySqlDbType.VarChar, 255), new MySqlParameter("@ADMIN_STATUS", MySqlDbType.Int32, 10), new MySqlParameter("@USERID", MySqlDbType.VarChar, 255), new MySqlParameter("@ADMIN_ID", MySqlDbType.VarChar, 255) }; parameters[0].Value = model.ID; parameters[1].Value = model.ADMIN_KIND; parameters[2].Value = model.ADMIN_DUTYBEGIN; parameters[3].Value = model.ADMIN_DUTYEND; parameters[4].Value = model.ADMIN_STATUS; parameters[5].Value = model.USERID; parameters[6].Value = model.ADMIN_ID; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(WalleProject.Model.t_systemleave model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into t_systemleave("); strSql.Append("sl_sort,sl_valid,sl_content,sl_pic_id,sl_per_id,sl_per_type,sl_date)"); strSql.Append(" values ("); strSql.Append("@sl_sort,@sl_valid,@sl_content,@sl_pic_id,@sl_per_id,@sl_per_type,@sl_date)"); MySqlParameter[] parameters = { new MySqlParameter("@sl_sort", MySqlDbType.Int32, 10), new MySqlParameter("@sl_valid", MySqlDbType.VarChar, 20), new MySqlParameter("@sl_content", MySqlDbType.Text), new MySqlParameter("@sl_pic_id", MySqlDbType.Int32, 10), new MySqlParameter("@sl_per_id", MySqlDbType.Int32, 10), new MySqlParameter("@sl_per_type", MySqlDbType.Int32, 10), new MySqlParameter("@sl_date", MySqlDbType.DateTime) }; parameters[0].Value = model.sl_sort; parameters[1].Value = model.sl_valid; parameters[2].Value = model.sl_content; parameters[3].Value = model.sl_pic_id; parameters[4].Value = model.sl_per_id; parameters[5].Value = model.sl_per_type; parameters[6].Value = model.sl_date; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Topicsys.Model.t_major model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update t_major set "); strSql.Append("major_name=@major_name,"); strSql.Append("major_dept_id=@major_dept_id,"); strSql.Append("major_stat=@major_stat,"); strSql.Append("major_note=@major_note"); strSql.Append(" where id=@id"); MySqlParameter[] parameters = { new MySqlParameter("@major_name", MySqlDbType.VarChar, 64), new MySqlParameter("@major_dept_id", MySqlDbType.VarChar, 40), new MySqlParameter("@major_stat", MySqlDbType.Int32, 1), new MySqlParameter("@major_note", MySqlDbType.VarChar, 255), new MySqlParameter("@id", MySqlDbType.Int32, 11), new MySqlParameter("@major_id", MySqlDbType.VarChar, 40) }; parameters[0].Value = model.major_name; parameters[1].Value = model.major_dept_id; parameters[2].Value = model.major_stat; parameters[3].Value = model.major_note; parameters[4].Value = model.id; parameters[5].Value = model.major_id; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(XHD.Model.scm_authority_supply model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into scm_authority_supply("); strSql.Append("Factory_Id,Suppliers_Id,App_ids,Menu_ids,Button_ids,Create_id,Create_date)"); strSql.Append(" values ("); strSql.Append("@Factory_Id,@Suppliers_Id,@App_ids,@Menu_ids,@Button_ids,@Create_id,@Create_date)"); MySqlParameter[] parameters = { new MySqlParameter("@Factory_Id", MySqlDbType.VarChar, 60), new MySqlParameter("@Suppliers_Id", MySqlDbType.Int32, 11), new MySqlParameter("@App_ids", MySqlDbType.VarChar, 250), new MySqlParameter("@Menu_ids", MySqlDbType.VarChar, 1000), new MySqlParameter("@Button_ids", MySqlDbType.VarChar, 3000), new MySqlParameter("@Create_id", MySqlDbType.Int32, 11), new MySqlParameter("@Create_date", MySqlDbType.DateTime) }; parameters[0].Value = model.Factory_Id; parameters[1].Value = model.Suppliers_Id; parameters[2].Value = model.App_ids; parameters[3].Value = model.Menu_ids; parameters[4].Value = model.Button_ids; parameters[5].Value = model.Create_id; parameters[6].Value = model.Create_date; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(DataAngine_Set.Model.device model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into device("); strSql.Append("name,address,departmentmentid,longitude,latitude,locationtype,remark)"); strSql.Append(" values ("); strSql.Append("@name,@address,@departmentmentid,@longitude,@latitude,@locationtype,@remark)"); MySqlParameter[] parameters = { new MySqlParameter("@name", MySqlDbType.VarChar, 50), new MySqlParameter("@address", MySqlDbType.VarChar, 50), new MySqlParameter("@departmentmentid", MySqlDbType.VarChar, 50), new MySqlParameter("@longitude", MySqlDbType.Double, 5), new MySqlParameter("@latitude", MySqlDbType.Double, 5), new MySqlParameter("@locationtype", MySqlDbType.Int32, 11), new MySqlParameter("@remark", MySqlDbType.VarChar, 50) }; parameters[0].Value = model.name; parameters[1].Value = model.address; parameters[2].Value = model.departmentmentid; parameters[3].Value = model.longitude; parameters[4].Value = model.latitude; parameters[5].Value = model.locationtype; parameters[6].Value = model.remark; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(ALS.Model.customactions model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into tb_customactions("); strSql.Append("methodName,timeCount,actionName,timeString,timeSpan,timeSpanString,tipPic)"); strSql.Append(" values ("); strSql.Append("@methodName,@timeCount,@actionName,@timeString,@timeSpan,@timeSpanString,tipPic)"); MySqlParameter[] parameters = { new MySqlParameter("@methodName", MySqlDbType.VarChar, 255), new MySqlParameter("@timeCount", MySqlDbType.Int32, 11), new MySqlParameter("@actionName", MySqlDbType.VarChar, 255), new MySqlParameter("@timeString", MySqlDbType.VarChar, 255), new MySqlParameter("@timeSpan", MySqlDbType.Int32, 11), new MySqlParameter("@timeSpanString", MySqlDbType.VarChar, 255), new MySqlParameter("@tipPic", MySqlDbType.LongBlob) }; parameters[0].Value = model.methodName; parameters[1].Value = model.timeCount; parameters[2].Value = model.actionName; parameters[3].Value = model.timeString; parameters[4].Value = model.timeSpan; parameters[5].Value = model.timeSpanString; parameters[6].Value = model.tipPic; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(XHD.Model.scm_spe_goods model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into scm_spe_goods("); strSql.Append("id,spe_order_id,order_goodsid,order_goodssn,goods_num,goods_price,split_num)"); strSql.Append(" values ("); strSql.Append("@id,@spe_order_id,@order_goodsid,@order_goodssn,@goods_num,@goods_price,@split_num)"); MySqlParameter[] parameters = { new MySqlParameter("@id", MySqlDbType.Int32, 11), new MySqlParameter("@spe_order_id", MySqlDbType.Int32, 11), new MySqlParameter("@order_goodsid", MySqlDbType.Int32, 11), new MySqlParameter("@order_goodssn", MySqlDbType.VarChar, 60), new MySqlParameter("@goods_num", MySqlDbType.Int32, 11), new MySqlParameter("@goods_price", MySqlDbType.Decimal, 10), new MySqlParameter("@split_num", MySqlDbType.Int32, 11) }; parameters[0].Value = model.id; parameters[1].Value = model.spe_order_id; parameters[2].Value = model.order_goodsid; parameters[3].Value = model.order_goodssn; parameters[4].Value = model.goods_num; parameters[5].Value = model.goods_price; parameters[6].Value = model.split_num; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(XHD.Model.CRM_using_feedback model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into crm_using_feedback("); strSql.Append("Factory_Id,usefeedback_title,usefeedback_content,create_id,create_name,create_time,isChanged)"); strSql.Append(" values ("); strSql.Append("@Factory_Id,@usefeedback_title,@usefeedback_content,@create_id,@create_name,@create_time,@isChanged)"); MySqlParameter[] parameters = { new MySqlParameter("@Factory_Id", MySqlDbType.VarChar, 60), new MySqlParameter("@usefeedback_title", MySqlDbType.VarChar, 200), new MySqlParameter("@usefeedback_content", MySqlDbType.LongText), new MySqlParameter("@create_id", MySqlDbType.Int32, 11), new MySqlParameter("@create_name", MySqlDbType.VarChar, 50), new MySqlParameter("@create_time", MySqlDbType.DateTime), new MySqlParameter("@isChanged", MySqlDbType.Int32, 11) }; parameters[0].Value = model.Factory_Id; parameters[1].Value = model.usefeedback_title; parameters[2].Value = model.usefeedback_content; parameters[3].Value = model.create_id; parameters[4].Value = model.create_name; parameters[5].Value = model.create_time; parameters[6].Value = model.isChanged; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(TwitterSpamDetection.Model.t_ind_trainingtime model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into t_ind_trainingtime("); strSql.Append("ID,Algorithm,TrainingTimeOne,TrainingTimeTwo,TrainingTimeThree,TrainingTimeFour,TrainingTimeFive)"); strSql.Append(" values ("); strSql.Append("@ID,@Algorithm,@TrainingTimeOne,@TrainingTimeTwo,@TrainingTimeThree,@TrainingTimeFour,@TrainingTimeFive)"); MySqlParameter[] parameters = { new MySqlParameter("@ID", MySqlDbType.VarChar, 36), new MySqlParameter("@Algorithm", MySqlDbType.VarChar, 100), new MySqlParameter("@TrainingTimeOne", MySqlDbType.VarChar, 45), new MySqlParameter("@TrainingTimeTwo", MySqlDbType.VarChar, 45), new MySqlParameter("@TrainingTimeThree", MySqlDbType.VarChar, 45), new MySqlParameter("@TrainingTimeFour", MySqlDbType.VarChar, 45), new MySqlParameter("@TrainingTimeFive", MySqlDbType.VarChar, 45) }; parameters[0].Value = model.ID; parameters[1].Value = model.Algorithm; parameters[2].Value = model.TrainingTimeOne; parameters[3].Value = model.TrainingTimeTwo; parameters[4].Value = model.TrainingTimeThree; parameters[5].Value = model.TrainingTimeFour; parameters[6].Value = model.TrainingTimeFive; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(MyBlogs.Model.Blogphoto model) { StringBuilder strSql=new StringBuilder(); strSql.Append("insert into blogphoto("); strSql.Append("Id,AuthorId,Album,TItle,Remark,Src,Status,AddTime,IsDel)"); strSql.Append(" values ("); strSql.Append("@Id,@AuthorId,@Album,@TItle,@Remark,@Src,@Status,@AddTime,@IsDel)"); MySqlParameter[] parameters = { new MySqlParameter("@Id", MySqlDbType.Int32,11), new MySqlParameter("@AuthorId", MySqlDbType.Int32,11), new MySqlParameter("@Album", MySqlDbType.Int32,11), new MySqlParameter("@TItle", MySqlDbType.VarChar,50), new MySqlParameter("@Remark", MySqlDbType.VarChar,255), new MySqlParameter("@Src", MySqlDbType.VarChar,255), new MySqlParameter("@Status", MySqlDbType.Int32,11), new MySqlParameter("@AddTime", MySqlDbType.Timestamp), new MySqlParameter("@IsDel", MySqlDbType.Bit)}; parameters[0].Value = model.Id; parameters[1].Value = model.AuthorId; parameters[2].Value = model.Album; parameters[3].Value = model.TItle; parameters[4].Value = model.Remark; parameters[5].Value = model.Src; parameters[6].Value = model.Status; parameters[7].Value = model.AddTime; parameters[8].Value = model.IsDel; int rows=DbHelperMySQL.ExecuteSql(strSql.ToString(),parameters); if (rows > 0) { return true; } else { return false; } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(kyfly.Model.jichu_zidianbiao model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update 基础_字典表 set "); strSql.Append("字段名称=@字段名称,"); strSql.Append("字段值=@字段值,"); strSql.Append("类别=@类别,"); strSql.Append("分类别=@分类别"); strSql.Append(" where Id=@Id"); MySqlParameter[] parameters = { new MySqlParameter("@字段名称", MySqlDbType.VarChar, 30), new MySqlParameter("@字段值", MySqlDbType.VarChar, 60), new MySqlParameter("@类别", MySqlDbType.VarChar, 30), new MySqlParameter("@分类别", MySqlDbType.VarChar, 30), new MySqlParameter("@Id", MySqlDbType.Int16, 6) }; parameters[0].Value = model.字段名称; parameters[1].Value = model.字段值; parameters[2].Value = model.类别; parameters[3].Value = model.分类别; parameters[4].Value = model.Id; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Light.Model.user_im model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update user_im set "); strSql.Append(" userid = @userid , "); strSql.Append(" imtoken = @imtoken , "); strSql.Append(" create_time = @create_time , "); strSql.Append(" update_time = @update_time "); strSql.Append(" where id=@id "); MySqlParameter[] parameters = { new MySqlParameter("@id", MySqlDbType.Int32, 11), new MySqlParameter("@userid", MySqlDbType.Int32, 11), new MySqlParameter("@imtoken", MySqlDbType.VarChar, 256), new MySqlParameter("@create_time", MySqlDbType.DateTime, 13), new MySqlParameter("@update_time", MySqlDbType.DateTime, 13) }; parameters[0].Value = model.id; parameters[1].Value = model.userid; parameters[2].Value = model.imtoken; parameters[3].Value = model.create_time; parameters[4].Value = model.update_time; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Model.t_ind_twittercredential model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into t_ind_twittercredential("); strSql.Append("ID,UserID,CreatedDate,ConsumerKey,ConsumerSecret,AccessToken,AccessTokenSecret)"); strSql.Append(" values ("); strSql.Append("@ID,@UserID,@CreatedDate,@ConsumerKey,@ConsumerSecret,@AccessToken,@AccessTokenSecret)"); MySqlParameter[] parameters = { new MySqlParameter("@ID", MySqlDbType.VarChar, 36), new MySqlParameter("@UserID", MySqlDbType.VarChar, 36), new MySqlParameter("@CreatedDate", MySqlDbType.DateTime), new MySqlParameter("@ConsumerKey", MySqlDbType.VarChar, 100), new MySqlParameter("@ConsumerSecret", MySqlDbType.VarChar, 100), new MySqlParameter("@AccessToken", MySqlDbType.VarChar, 100), new MySqlParameter("@AccessTokenSecret", MySqlDbType.VarChar, 100) }; parameters[0].Value = model.ID; parameters[1].Value = model.UserID; parameters[2].Value = model.CreatedDate; parameters[3].Value = model.ConsumerKey; parameters[4].Value = model.ConsumerSecret; parameters[5].Value = model.AccessToken; parameters[6].Value = model.AccessTokenSecret; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(IMeiWei.Model.ticketinfo model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into ticketinfo("); strSql.Append("Id,TicketId,Code,UseTime,Status,MappingUserId,MappingUserPhone)"); strSql.Append(" values ("); strSql.Append("@Id,@TicketId,@Code,@UseTime,@Status,@MappingUserId,@MappingUserPhone)"); MySqlParameter[] parameters = { new MySqlParameter("@Id", MySqlDbType.Int64, 20), new MySqlParameter("@TicketId", MySqlDbType.Int64, 20), new MySqlParameter("@Code", MySqlDbType.VarChar, 255), new MySqlParameter("@UseTime", MySqlDbType.DateTime), new MySqlParameter("@Status", MySqlDbType.VarChar, 255), new MySqlParameter("@MappingUserId", MySqlDbType.Int64, 20), new MySqlParameter("@MappingUserPhone", MySqlDbType.VarChar, 255) }; parameters[0].Value = model.Id; parameters[1].Value = model.TicketId; parameters[2].Value = model.Code; parameters[3].Value = model.UseTime; parameters[4].Value = model.Status; parameters[5].Value = model.MappingUserId; parameters[6].Value = model.MappingUserPhone; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Jium.Model.userlog model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into userlog("); strSql.Append("usercode,useraddr,opertype,operobject,opervalue,operdesc,opertime)"); strSql.Append(" values ("); strSql.Append("@usercode,@useraddr,@opertype,@operobject,@opervalue,@operdesc,@opertime)"); MySqlParameter[] parameters = { new MySqlParameter("@usercode", MySqlDbType.VarChar, 40), new MySqlParameter("@useraddr", MySqlDbType.VarChar, 40), new MySqlParameter("@opertype", MySqlDbType.VarChar, 20), new MySqlParameter("@operobject", MySqlDbType.VarChar, 40), new MySqlParameter("@opervalue", MySqlDbType.VarChar, 40), new MySqlParameter("@operdesc", MySqlDbType.VarChar, 100), new MySqlParameter("@opertime", MySqlDbType.VarChar, 20) }; parameters[0].Value = model.usercode; parameters[1].Value = model.useraddr; parameters[2].Value = model.opertype; parameters[3].Value = model.operobject; parameters[4].Value = model.opervalue; parameters[5].Value = model.operdesc; parameters[6].Value = model.opertime; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(int Id) { //该表无主键信息,请自定义主键/条件字段 StringBuilder strSql = new StringBuilder(); strSql.Append("delete from 业务_订单信息表 "); strSql.Append(" where Id=@Id"); MySqlParameter[] parameters = { new MySqlParameter("@Id", MySql.Data.MySqlClient.MySqlDbType.Int16, 11) }; parameters[0].Value = Id; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(int id) { StringBuilder strSql = new StringBuilder(); strSql.Append("delete from roleinfo "); strSql.Append(" where id=@id "); MySqlParameter[] parameters = { new MySqlParameter("@id", MySqlDbType.Int32, 10) }; parameters[0].Value = id; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
public void AddPkLog(long gameId, DateTime startTime, DateTime endTime, int man1, int wife1, int result1, int man2, int wife2, int result2) { try { string sql = string.Format("INSERT INTO t_couple_arena_pk_log(`id`,`man_rid1`,`wife_rid1`,`result1`,`man_rid2`,`wife_rid2`,`result2`,`day`,`starttime`,`endtime`) VALUES({0},{1},{2},{3},{4},{5},{6},{7},'{8}','{9}');", new object[] { gameId, man1, wife1, result1, man2, wife2, result2, TimeUtil.MakeYearMonthDay(startTime), startTime.ToString("yyyy-MM-dd HH:mm:ss"), endTime.ToString("yyyy-MM-dd HH:mm:ss") }); DbHelperMySQL.ExecuteSql(sql); } catch (Exception ex) { LogManager.WriteException(ex.Message); } }
public bool Update(DataAngine.Model.statistics model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update statistics set "); strSql.Append("startTime=@startTime,"); strSql.Append("catchFaceImgCount=@catchFaceImgCount,"); strSql.Append("matchFaceCount=@matchFaceCount,"); strSql.Append("endTime=@endTime"); strSql.Append(" where id=@id"); MySqlParameter[] parameters = { new MySqlParameter("@startTime", MySqlDbType.DateTime), new MySqlParameter("@catchFaceImgCount", MySqlDbType.Int32, 255), new MySqlParameter("@matchFaceCount", MySqlDbType.Int32, 255), new MySqlParameter("@endTime", MySqlDbType.DateTime), new MySqlParameter("@id", MySqlDbType.Int32, 11) }; parameters[0].Value = model.StartTime; parameters[1].Value = model.CatchFaceImgCount; parameters[2].Value = model.MatchFaceCount; parameters[3].Value = model.EndTime; parameters[4].Value = model.Id; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public void Add(XHD.Model.Sys_online model) { //StringBuilder strSql=new StringBuilder(); //strSql.Append("insert into Sys_online("); //strSql.Append("UserID,UserName,LastLogTime)"); //strSql.Append(" values ("); //strSql.Append("@UserID,@UserName,@LastLogTime)"); //MySqlParameter[] parameters = { // new MySqlParameter("@UserID", MySqlDbType.Int32,4), // new MySqlParameter("@UserName", MySqlDbType.VarChar,50), // new MySqlParameter("@LastLogTime", MySqlDbType.DateTime)}; //parameters[0].Value = model.UserID; //parameters[1].Value = model.UserName; //parameters[2].Value = model.LastLogTime; //DbHelperMySQL.ExecuteSql(strSql.ToString(),parameters); //Robert 2015-11-23 string strSql = string.Format(@"insert into Sys_online(UserID,UserName,LastLogTime) values ('{0}','{1}','{2}')", model.UserID, model.UserName, model.LastLogTime); DbHelperMySQL.ExecuteSql(strSql.ToString()); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(XHD.Model.Sys_data_authority model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into Sys_data_authority("); strSql.Append("Role_id,option_id,Sys_option,Sys_view,Sys_add,Sys_edit,Sys_del,Create_id,Create_date,Factory_Id,Type)"); strSql.Append(" values ("); strSql.Append("@Role_id,@option_id,@Sys_option,@Sys_view,@Sys_add,@Sys_edit,@Sys_del,@Create_id,@Create_date,@Factory_Id,@Type)"); MySqlParameter[] parameters = { new MySqlParameter("@Role_id", MySqlDbType.Int32, 4), new MySqlParameter("@option_id", MySqlDbType.Int32, 4), new MySqlParameter("@Sys_option", MySqlDbType.VarChar, 250), new MySqlParameter("@Sys_view", MySqlDbType.Int32, 4), new MySqlParameter("@Sys_add", MySqlDbType.Int32, 4), new MySqlParameter("@Sys_edit", MySqlDbType.Int32, 4), new MySqlParameter("@Sys_del", MySqlDbType.Int32, 4), new MySqlParameter("@Create_id", MySqlDbType.Int32, 4), new MySqlParameter("@Create_date", MySqlDbType.DateTime), new MySqlParameter("@Factory_Id", MySqlDbType.VarChar, 60), new MySqlParameter("@Type", MySqlDbType.Int32, 4) }; parameters[0].Value = model.Role_id; parameters[1].Value = model.option_id; parameters[2].Value = model.Sys_option; parameters[3].Value = model.Sys_view; parameters[4].Value = model.Sys_add; parameters[5].Value = model.Sys_edit; parameters[6].Value = model.Sys_del; parameters[7].Value = model.Create_id; parameters[8].Value = model.Create_date; parameters[9].Value = model.Factory_id; parameters[10].Value = model.Type; DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); }
/// <summary> /// 附表同步商城 /// </summary> public bool CopyToShop(int goods_id) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into bzsldygx(BM,ZTIDH,ID,GX,XSJ1,XSJ2,XSJ3,XSJ4,XSJ5,BZDW,BZSM,HSGX,TXM,TXM8) "); strSql.Append(" select BM,ZTIDH,ID,GX,XSJ1,XSJ2,XSJ3,XSJ4,XSJ5,BZDW,BZSM,HSGX,TXM,TXM8 "); strSql.Append(" from scm_bzsldygx where BM=@BM "); MySqlParameter[] parameters = { new MySqlParameter("@BM", MySqlDbType.Int16, 8) }; parameters[0].Value = goods_id; int row = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (row > 0) { return(true); } else { return(false); } }
/// <summary> /// 批量 /// </summary> public bool Update_batch(XHD.Model.CRM_order model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update CRM_order set "); strSql.Append("F_dep_id=@F_dep_id,"); strSql.Append("F_dep_name=@F_dep_name,"); strSql.Append("F_emp_id=@F_emp_id,"); strSql.Append("F_emp_name=@F_emp_name"); strSql.Append(" where F_emp_id=@create_id"); MySqlParameter[] parameters = { new MySqlParameter("@F_dep_id", MySqlDbType.Int32, 4), new MySqlParameter("@F_dep_name", MySqlDbType.VarChar, 250), new MySqlParameter("@F_emp_id", MySqlDbType.Int32, 4), new MySqlParameter("@F_emp_name", MySqlDbType.VarChar, 250), new MySqlParameter("@create_id", MySqlDbType.Int32, 4) }; parameters[0].Value = model.F_dep_id; parameters[1].Value = model.F_dep_name; parameters[2].Value = model.F_emp_id; parameters[3].Value = model.F_emp_name; parameters[4].Value = model.create_id; int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 附表同步到商城 /// </summary> public bool CopyToShop(int goods_id) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into ecs_goods_gallery( img_id,goods_id,img_url,img_desc,thumb_url,img_original) "); strSql.Append(" select img_id,goods_id,img_url,img_desc,thumb_url,img_original "); strSql.Append(" from scm_goods_gallery where goods_id=@goods_id "); MySqlParameter[] parameters = { new MySqlParameter("@goods_id", MySqlDbType.Int16, 8) }; parameters[0].Value = goods_id; int row = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters); if (row > 0) { return(true); } else { return(false); } }