public int Update(YHFramework.SysModel.CodeDataModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update CodeData set "); strSql.Append("CodeData=@CodeData,ShortCodeData=@ShortCodeData,CodeIndex=@CodeIndex,BatchNumber=@BatchNumber,BoxNumberId=@BoxNumberId,ContentStatusId=@ContentStatusId,UpdateOn=@UpdateOn,Createon=@Createon,ApployInfoId=@ApployInfoId "); strSql.Append(" where CodeDataId=@CodeDataId "); SqlParameter[] parameters = { new SqlParameter("@CodeData", DbTool.FixSqlParameter(model.CodeData)) , new SqlParameter("@ShortCodeData", DbTool.FixSqlParameter(model.ShortCodeData)) , new SqlParameter("@CodeIndex", DbTool.FixSqlParameter(model.CodeIndex)) , new SqlParameter("@BatchNumber", DbTool.FixSqlParameter(model.BatchNumber)) , new SqlParameter("@BoxNumberId", DbTool.FixSqlParameter(model.BoxNumberId)) , new SqlParameter("@ContentStatusId", DbTool.FixSqlParameter(model.ContentStatusId)) , new SqlParameter("@UpdateOn", DbTool.FixSqlParameter(model.UpdateOn)) , new SqlParameter("@Createon", DbTool.FixSqlParameter(model.Createon)) , new SqlParameter("@ApployInfoId", DbTool.FixSqlParameter(model.ApployInfoId)) , new SqlParameter("@CodeDataId", model.CodeDataId) }; return(SqlHelper.ExecuteNonQuery(conn, CommandType.Text, strSql.ToString(), parameters)); }
public int Update(YHFramework.SysModel.ExecutePlanModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update ExecutePlan set "); strSql.Append("CodeType=@CodeType,MaxCount=@MaxCount,EachCount=@EachCount,BatchCodeBegin=@BatchCodeBegin,EffectiveDateBegin=@EffectiveDateBegin,GeneratedCount=@GeneratedCount,CurrentBatchCode=@CurrentBatchCode,Status=@Status,CustomerEmail=@CustomerEmail "); strSql.Append(" where Id=@Id "); SqlParameter[] parameters = { new SqlParameter("@CodeType", DbTool.FixSqlParameter(model.CodeType)) , new SqlParameter("@MaxCount", DbTool.FixSqlParameter(model.MaxCount)) , new SqlParameter("@EachCount", DbTool.FixSqlParameter(model.EachCount)) , new SqlParameter("@BatchCodeBegin", DbTool.FixSqlParameter(model.BatchCodeBegin)) , new SqlParameter("@EffectiveDateBegin", DbTool.FixSqlParameter(model.EffectiveDateBegin)) , new SqlParameter("@GeneratedCount", DbTool.FixSqlParameter(model.GeneratedCount)) , new SqlParameter("@CurrentBatchCode", DbTool.FixSqlParameter(model.CurrentBatchCode)) , new SqlParameter("@Status", DbTool.FixSqlParameter(model.Status)) , new SqlParameter("@CustomerEmail", DbTool.FixSqlParameter(model.CustomerEmail)) , new SqlParameter("@Id", model.Id) }; return(SqlHelper.ExecuteNonQuery(conn, CommandType.Text, strSql.ToString(), parameters)); }
public int Update(YHFramework.SysModel.BoxNumberModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update BoxNumber set "); strSql.Append("BoxNumber=@BoxNumber,ShortBoxNumber=@ShortBoxNumber,IndexCode=@IndexCode,BatchNumber=@BatchNumber,ContentStatusId=@ContentStatusId,IsBind=@IsBind,BindTime=@BindTime,UpdateOn=@UpdateOn,CreateOn=@CreateOn,ApployInfoId=@ApployInfoId "); strSql.Append(" where BoxNumberId=@BoxNumberId "); SqlParameter[] parameters = { new SqlParameter("@BoxNumber", DbTool.FixSqlParameter(model.BoxNumber)) , new SqlParameter("@ShortBoxNumber", DbTool.FixSqlParameter(model.ShortBoxNumber)) , new SqlParameter("@IndexCode", DbTool.FixSqlParameter(model.IndexCode)) , new SqlParameter("@BatchNumber", DbTool.FixSqlParameter(model.BatchNumber)) , new SqlParameter("@ContentStatusId", DbTool.FixSqlParameter(model.ContentStatusId)) , new SqlParameter("@IsBind", DbTool.FixSqlParameter(model.IsBind)) , new SqlParameter("@BindTime", DbTool.FixSqlParameter(model.BindTime)) , new SqlParameter("@UpdateOn", DbTool.FixSqlParameter(model.UpdateOn)) , new SqlParameter("@CreateOn", DbTool.FixSqlParameter(model.CreateOn)) , new SqlParameter("@ApployInfoId", DbTool.FixSqlParameter(model.ApployInfoId)) , new SqlParameter("@BoxNumberId", model.BoxNumberId) }; return(SqlHelper.ExecuteNonQuery(conn, CommandType.Text, strSql.ToString(), parameters)); }
public int Add(UpInfoModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into [UpInfo]"); strSql.Append("(Title,FileName,ApployTime,BathCode,Secret,CustomerEmail,Type,Url,Status,CreatedTime,UpdateTime,DownTime,CompleteTime,Remarks)"); strSql.Append(" values (@Title,@FileName,@ApployTime,@BathCode,@Secret,@CustomerEmail,@Type,@Url,@Status,@CreatedTime,@UpdateTime,@DownTime,@CompleteTime,@Remarks)"); strSql.Append(";select SCOPE_IDENTITY()"); SqlParameter[] parameters = { new SqlParameter("@Title", DbTool.FixSqlParameter(model.Title)) , new SqlParameter("@FileName", DbTool.FixSqlParameter(model.FileName)) , new SqlParameter("@ApployTime", DbTool.FixSqlParameter(model.ApployTime)) , new SqlParameter("@BathCode", DbTool.FixSqlParameter(model.BathCode)) , new SqlParameter("@Secret", DbTool.FixSqlParameter(model.Secret)) , new SqlParameter("@CustomerEmail", DbTool.FixSqlParameter(model.CustomerEmail)) , new SqlParameter("@Type", DbTool.FixSqlParameter(model.Type)) , new SqlParameter("@Url", DbTool.FixSqlParameter(model.Url)) , new SqlParameter("@Status", DbTool.FixSqlParameter(model.Status)) , new SqlParameter("@CreatedTime", DbTool.FixSqlParameter(model.CreatedTime)) , new SqlParameter("@UpdateTime", DbTool.FixSqlParameter(model.UpdateTime)) , new SqlParameter("@DownTime", DbTool.FixSqlParameter(model.DownTime)) , new SqlParameter("@CompleteTime", DbTool.FixSqlParameter(model.CompleteTime)) , new SqlParameter("@Remarks", DbTool.FixSqlParameter(model.Remarks)) }; return(DbTool.ConvertObject <int>(SqlHelper.ExecuteScalar(conn, CommandType.Text, strSql.ToString(), parameters), 0)); }
public int Add(YHFramework.SysModel.BoxNumberModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into [BoxNumber]"); strSql.Append("(BoxNumber,ShortBoxNumber,IndexCode,BatchNumber,ContentStatusId,IsBind,BindTime,UpdateOn,CreateOn,ApployInfoId)"); strSql.Append(" values (@BoxNumber,@ShortBoxNumber,@IndexCode,@BatchNumber,@ContentStatusId,@IsBind,@BindTime,@UpdateOn,@CreateOn,@ApployInfoId)"); strSql.Append(";select SCOPE_IDENTITY()"); SqlParameter[] parameters = { new SqlParameter("@BoxNumber", DbTool.FixSqlParameter(model.BoxNumber)) , new SqlParameter("@ShortBoxNumber", DbTool.FixSqlParameter(model.ShortBoxNumber)) , new SqlParameter("@IndexCode", DbTool.FixSqlParameter(model.IndexCode)) , new SqlParameter("@BatchNumber", DbTool.FixSqlParameter(model.BatchNumber)) , new SqlParameter("@ContentStatusId", DbTool.FixSqlParameter(model.ContentStatusId)) , new SqlParameter("@IsBind", DbTool.FixSqlParameter(model.IsBind)) , new SqlParameter("@BindTime", DbTool.FixSqlParameter(model.BindTime)) , new SqlParameter("@UpdateOn", DbTool.FixSqlParameter(model.UpdateOn)) , new SqlParameter("@CreateOn", DbTool.FixSqlParameter(model.CreateOn)) , new SqlParameter("@ApployInfoId", DbTool.FixSqlParameter(model.ApployInfoId)) }; return(DbTool.ConvertObject <int>(SqlHelper.ExecuteScalar(conn, CommandType.Text, strSql.ToString(), parameters), 0)); }
public int Update(UpInfoModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update UpInfo set "); strSql.Append("Title=@Title,FileName=@FileName,ApployTime=@ApployTime,BathCode=@BathCode,Secret=@Secret,CustomerEmail=@CustomerEmail,Type=@Type,Url=@Url,Status=@Status,CreatedTime=@CreatedTime,UpdateTime=@UpdateTime,DownTime=@DownTime,CompleteTime=@CompleteTime,Remarks=@Remarks "); strSql.Append(" where ID=@ID "); SqlParameter[] parameters = { new SqlParameter("@Title", DbTool.FixSqlParameter(model.Title)) , new SqlParameter("@FileName", DbTool.FixSqlParameter(model.FileName)) , new SqlParameter("@ApployTime", DbTool.FixSqlParameter(model.ApployTime)) , new SqlParameter("@BathCode", DbTool.FixSqlParameter(model.BathCode)) , new SqlParameter("@Secret", DbTool.FixSqlParameter(model.Secret)) , new SqlParameter("@CustomerEmail", DbTool.FixSqlParameter(model.CustomerEmail)) , new SqlParameter("@Type", DbTool.FixSqlParameter(model.Type)) , new SqlParameter("@Url", DbTool.FixSqlParameter(model.Url)) , new SqlParameter("@Status", DbTool.FixSqlParameter(model.Status)) , new SqlParameter("@CreatedTime", DbTool.FixSqlParameter(model.CreatedTime)) , new SqlParameter("@UpdateTime", DbTool.FixSqlParameter(model.UpdateTime)) , new SqlParameter("@DownTime", DbTool.FixSqlParameter(model.DownTime)) , new SqlParameter("@CompleteTime", DbTool.FixSqlParameter(model.CompleteTime)) , new SqlParameter("@Remarks", DbTool.FixSqlParameter(model.Remarks)) , new SqlParameter("@ID", model.ID) }; return(SqlHelper.ExecuteNonQuery(conn, CommandType.Text, strSql.ToString(), parameters)); }
public int Add(Model.Security.IpAccessControlSettingModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into [IpAccessControlSetting]"); strSql.Append("(LogType,IPAccessEnable,IPAccessMaxCount,IPAccessControlTime,IPAccessControlLockTime)"); strSql.Append(" values (@LogType,@IPAccessEnable,@IPAccessMaxCount,@IPAccessControlTime,@IPAccessControlLockTime)"); strSql.Append(";select SCOPE_IDENTITY()"); SqlParameter[] parameters = { new SqlParameter("@LogType", DbTool.FixSqlParameter(model.LogType)) , new SqlParameter("@IPAccessEnable", DbTool.FixSqlParameter(model.IPAccessEnable)) , new SqlParameter("@IPAccessMaxCount", DbTool.FixSqlParameter(model.IPAccessMaxCount)) , new SqlParameter("@IPAccessControlTime", DbTool.FixSqlParameter(model.IPAccessControlTime)) , new SqlParameter("@IPAccessControlLockTime", DbTool.FixSqlParameter(model.IPAccessControlLockTime)) }; return(DbTool.ConvertObject <int>(SqlHelper.ExecuteScalar(conn, CommandType.Text, strSql.ToString(), parameters), 0)); }
public int Add(Model.Security.IpAccessControlModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into [IpAccessControl]"); strSql.Append("(LogType,IpAddress,AccessCount,Islocked,FistDateTime,UpdateDate)"); strSql.Append(" values (@LogType,@IpAddress,@AccessCount,@Islocked,@FistDateTime,@UpdateDate)"); strSql.Append(";select SCOPE_IDENTITY()"); SqlParameter[] parameters = { new SqlParameter("@LogType", DbTool.FixSqlParameter(model.LogType)) , new SqlParameter("@IpAddress", DbTool.FixSqlParameter(model.IpAddress)) , new SqlParameter("@AccessCount", DbTool.FixSqlParameter(model.AccessCount)) , new SqlParameter("@Islocked", DbTool.FixSqlParameter(model.Islocked)) , new SqlParameter("@FistDateTime", DbTool.FixSqlParameter(model.FistDateTime)) , new SqlParameter("@UpdateDate", DbTool.FixSqlParameter(model.UpdateDate)) }; return(DbTool.ConvertObject <int>(SqlHelper.ExecuteScalar(conn, CommandType.Text, strSql.ToString(), parameters), 0)); }
public int Update(Model.Security.IpAccessControlSettingModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update IpAccessControlSetting set "); strSql.Append("LogType=@LogType,IPAccessEnable=@IPAccessEnable,IPAccessMaxCount=@IPAccessMaxCount,IPAccessControlTime=@IPAccessControlTime,IPAccessControlLockTime=@IPAccessControlLockTime "); strSql.Append(" where Id=@Id "); SqlParameter[] parameters = { new SqlParameter("@LogType", DbTool.FixSqlParameter(model.LogType)) , new SqlParameter("@IPAccessEnable", DbTool.FixSqlParameter(model.IPAccessEnable)) , new SqlParameter("@IPAccessMaxCount", DbTool.FixSqlParameter(model.IPAccessMaxCount)) , new SqlParameter("@IPAccessControlTime", DbTool.FixSqlParameter(model.IPAccessControlTime)) , new SqlParameter("@IPAccessControlLockTime", DbTool.FixSqlParameter(model.IPAccessControlLockTime)) , new SqlParameter("@Id", model.Id) }; return(SqlHelper.ExecuteNonQuery(conn, CommandType.Text, strSql.ToString(), parameters)); }
public int Add(ActionLogModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into [ActionLog]"); strSql.Append("(ActionName,UserName,ActionResult,KeyData,Notes,CreateOn)"); strSql.Append(" values (@ActionName,@UserName,@ActionResult,@KeyData,@Notes,@CreateOn)"); strSql.Append(";select SCOPE_IDENTITY()"); SqlParameter[] parameters = { new SqlParameter("@ActionName", DbTool.FixSqlParameter(model.ActionName)) , new SqlParameter("@UserName", DbTool.FixSqlParameter(model.UserName)) , new SqlParameter("@ActionResult", DbTool.FixSqlParameter(model.ActionResult)) , new SqlParameter("@KeyData", DbTool.FixSqlParameter(model.KeyData)) , new SqlParameter("@Notes", DbTool.FixSqlParameter(model.Notes)) , new SqlParameter("@CreateOn", DbTool.FixSqlParameter(model.CreateOn)) }; return(DbTool.ConvertObject <int>(SqlHelper.ExecuteScalar(conn, CommandType.Text, strSql.ToString(), parameters), 0)); }
public int Update(ActionLogModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update ActionLog set "); strSql.Append("ActionName=@ActionName,UserName=@UserName,ActionResult=@ActionResult,KeyData=@KeyData,Notes=@Notes,CreateOn=@CreateOn "); strSql.Append(" where ActionLogId=@ActionLogId "); SqlParameter[] parameters = { new SqlParameter("@ActionName", DbTool.FixSqlParameter(model.ActionName)) , new SqlParameter("@UserName", DbTool.FixSqlParameter(model.UserName)) , new SqlParameter("@ActionResult", DbTool.FixSqlParameter(model.ActionResult)) , new SqlParameter("@KeyData", DbTool.FixSqlParameter(model.KeyData)) , new SqlParameter("@Notes", DbTool.FixSqlParameter(model.Notes)) , new SqlParameter("@CreateOn", DbTool.FixSqlParameter(model.CreateOn)) , new SqlParameter("@ActionLogId", model.ActionLogId) }; return(SqlHelper.ExecuteNonQuery(conn, CommandType.Text, strSql.ToString(), parameters)); }
public int Add(Model.Security.IpAccessControlLogModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into [IpAccessControlLog]"); strSql.Append("(IpAddress,LogType,LockedDate,CreateOn,LockValue,LockReason,SourceURL)"); strSql.Append(" values (@IpAddress,@LogType,@LockedDate,@CreateOn,@LockValue,@LockReason,@SourceURL)"); strSql.Append(";select SCOPE_IDENTITY()"); SqlParameter[] parameters = { new SqlParameter("@IpAddress", DbTool.FixSqlParameter(model.IpAddress)) , new SqlParameter("@LogType", DbTool.FixSqlParameter(model.LogType)) , new SqlParameter("@LockedDate", DbTool.FixSqlParameter(model.LockedDate)) , new SqlParameter("@CreateOn", DbTool.FixSqlParameter(model.CreateOn)) , new SqlParameter("@LockValue", DbTool.FixSqlParameter(model.LockValue)) , new SqlParameter("@LockReason", DbTool.FixSqlParameter(model.LockReason)) , new SqlParameter("@SourceURL", DbTool.FixSqlParameter(model.SourceURL)) }; return(DbTool.ConvertObject <int>(SqlHelper.ExecuteScalar(conn, CommandType.Text, strSql.ToString(), parameters), 0)); }
public int Update(Model.Security.IpAccessControlModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update IpAccessControl set "); strSql.Append("LogType=@LogType,IpAddress=@IpAddress,AccessCount=@AccessCount,Islocked=@Islocked,FistDateTime=@FistDateTime,UpdateDate=@UpdateDate "); strSql.Append(" where Id=@Id "); SqlParameter[] parameters = { new SqlParameter("@LogType", DbTool.FixSqlParameter(model.LogType)) , new SqlParameter("@IpAddress", DbTool.FixSqlParameter(model.IpAddress)) , new SqlParameter("@AccessCount", DbTool.FixSqlParameter(model.AccessCount)) , new SqlParameter("@Islocked", DbTool.FixSqlParameter(model.Islocked)) , new SqlParameter("@FistDateTime", DbTool.FixSqlParameter(model.FistDateTime)) , new SqlParameter("@UpdateDate", DbTool.FixSqlParameter(model.UpdateDate)) , new SqlParameter("@Id", model.Id) }; return(SqlHelper.ExecuteNonQuery(conn, CommandType.Text, strSql.ToString(), parameters)); }
public int Add(YHFramework.SysModel.ApployCheckLogModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into [ApployCheckLog]"); strSql.Append("(ApployId,TypeCode,FileName,Number,Message,CreateOn,UpdateOn)"); strSql.Append(" values (@ApployId,@TypeCode,@FileName,@Number,@Message,@CreateOn,@UpdateOn)"); strSql.Append(";select SCOPE_IDENTITY()"); SqlParameter[] parameters = { new SqlParameter("@ApployId", DbTool.FixSqlParameter(model.ApployId)) , new SqlParameter("@TypeCode", DbTool.FixSqlParameter(model.TypeCode)) , new SqlParameter("@FileName", DbTool.FixSqlParameter(model.FileName)) , new SqlParameter("@Number", DbTool.FixSqlParameter(model.Number)) , new SqlParameter("@Message", DbTool.FixSqlParameter(model.Message)) , new SqlParameter("@CreateOn", DbTool.FixSqlParameter(model.CreateOn)) , new SqlParameter("@UpdateOn", DbTool.FixSqlParameter(model.UpdateOn)) }; return(DbTool.ConvertObject <int>(SqlHelper.ExecuteScalar(conn, CommandType.Text, strSql.ToString(), parameters), 0)); }
public int Update(Model.Security.IpAccessControlLogModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update IpAccessControlLog set "); strSql.Append("IpAddress=@IpAddress,LogType=@LogType,LockedDate=@LockedDate,CreateOn=@CreateOn,LockValue=@LockValue,LockReason=@LockReason,SourceURL=@SourceURL "); strSql.Append(" where Id=@Id "); SqlParameter[] parameters = { new SqlParameter("@IpAddress", DbTool.FixSqlParameter(model.IpAddress)) , new SqlParameter("@LogType", DbTool.FixSqlParameter(model.LogType)) , new SqlParameter("@LockedDate", DbTool.FixSqlParameter(model.LockedDate)) , new SqlParameter("@CreateOn", DbTool.FixSqlParameter(model.CreateOn)) , new SqlParameter("@LockValue", DbTool.FixSqlParameter(model.LockValue)) , new SqlParameter("@LockReason", DbTool.FixSqlParameter(model.LockReason)) , new SqlParameter("@SourceURL", DbTool.FixSqlParameter(model.SourceURL)) , new SqlParameter("@Id", model.Id) }; return(SqlHelper.ExecuteNonQuery(conn, CommandType.Text, strSql.ToString(), parameters)); }
public int Update(YHFramework.SysModel.ApployCheckLogModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update ApployCheckLog set "); strSql.Append("ApployId=@ApployId,TypeCode=@TypeCode,FileName=@FileName,Number=@Number,Message=@Message,CreateOn=@CreateOn,UpdateOn=@UpdateOn "); strSql.Append(" where CheckLogId=@CheckLogId "); SqlParameter[] parameters = { new SqlParameter("@ApployId", DbTool.FixSqlParameter(model.ApployId)) , new SqlParameter("@TypeCode", DbTool.FixSqlParameter(model.TypeCode)) , new SqlParameter("@FileName", DbTool.FixSqlParameter(model.FileName)) , new SqlParameter("@Number", DbTool.FixSqlParameter(model.Number)) , new SqlParameter("@Message", DbTool.FixSqlParameter(model.Message)) , new SqlParameter("@CreateOn", DbTool.FixSqlParameter(model.CreateOn)) , new SqlParameter("@UpdateOn", DbTool.FixSqlParameter(model.UpdateOn)) , new SqlParameter("@CheckLogId", model.CheckLogId) }; return(SqlHelper.ExecuteNonQuery(conn, CommandType.Text, strSql.ToString(), parameters)); }
public int Add(YHFramework.SysModel.ExecutePlanModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into [ExecutePlan]"); strSql.Append("(CodeType,MaxCount,EachCount,BatchCodeBegin,EffectiveDateBegin,GeneratedCount,CurrentBatchCode,Status,CustomerEmail)"); strSql.Append(" values (@CodeType,@MaxCount,@EachCount,@BatchCodeBegin,@EffectiveDateBegin,@GeneratedCount,@CurrentBatchCode,@Status,@CustomerEmail)"); strSql.Append(";select SCOPE_IDENTITY()"); SqlParameter[] parameters = { new SqlParameter("@CodeType", DbTool.FixSqlParameter(model.CodeType)) , new SqlParameter("@MaxCount", DbTool.FixSqlParameter(model.MaxCount)) , new SqlParameter("@EachCount", DbTool.FixSqlParameter(model.EachCount)) , new SqlParameter("@BatchCodeBegin", DbTool.FixSqlParameter(model.BatchCodeBegin)) , new SqlParameter("@EffectiveDateBegin", DbTool.FixSqlParameter(model.EffectiveDateBegin)) , new SqlParameter("@GeneratedCount", DbTool.FixSqlParameter(model.GeneratedCount)) , new SqlParameter("@CurrentBatchCode", DbTool.FixSqlParameter(model.CurrentBatchCode)) , new SqlParameter("@Status", DbTool.FixSqlParameter(model.Status)) , new SqlParameter("@CustomerEmail", DbTool.FixSqlParameter(model.CustomerEmail)) }; return(DbTool.ConvertObject <int>(SqlHelper.ExecuteScalar(conn, CommandType.Text, strSql.ToString(), parameters), 0)); }
public int Add(YHFramework.SysModel.CodeDataModel model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into [CodeData]"); strSql.Append("(CodeData,ShortCodeData,CodeIndex,BatchNumber,BoxNumberId,ContentStatusId,UpdateOn,Createon,ApployInfoId)"); strSql.Append(" values (@CodeData,@ShortCodeData,@CodeIndex,@BatchNumber,@BoxNumberId,@ContentStatusId,@UpdateOn,@Createon,@ApployInfoId)"); strSql.Append(";select SCOPE_IDENTITY()"); SqlParameter[] parameters = { new SqlParameter("@CodeData", DbTool.FixSqlParameter(model.CodeData)) , new SqlParameter("@ShortCodeData", DbTool.FixSqlParameter(model.ShortCodeData)) , new SqlParameter("@CodeIndex", DbTool.FixSqlParameter(model.CodeIndex)) , new SqlParameter("@BatchNumber", DbTool.FixSqlParameter(model.BatchNumber)) , new SqlParameter("@BoxNumberId", DbTool.FixSqlParameter(model.BoxNumberId)) , new SqlParameter("@ContentStatusId", DbTool.FixSqlParameter(model.ContentStatusId)) , new SqlParameter("@UpdateOn", DbTool.FixSqlParameter(model.UpdateOn)) , new SqlParameter("@Createon", DbTool.FixSqlParameter(model.Createon)) , new SqlParameter("@ApployInfoId", DbTool.FixSqlParameter(model.ApployInfoId)) }; return(DbTool.ConvertObject <int>(SqlHelper.ExecuteScalar(conn, CommandType.Text, strSql.ToString(), parameters), 0)); }