コード例 #1
0
ファイル: MofangSendLogDAL.cs プロジェクト: hofmannzhu/bwjs
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(MofangSendLog model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into MofangSendLog(");
            strSql.Append("MothodName,FKID,TransNo,IsSend,Message,SendTime,CreatUserID,RecordUpdateUserID,RecordIsDelete,RecordUpdateTime,RecordCreateTime");
            strSql.Append(") values (");
            strSql.Append("@MothodName,@FKID,@TransNo,@IsSend,@Message,@SendTime,@CreatUserID,@RecordUpdateUserID,@RecordIsDelete,@RecordUpdateTime,@RecordCreateTime");
            strSql.Append(") ");
            strSql.Append(";select SCOPE_IDENTITY()");
            SqlParameter[] parameters =
            {
                new SqlParameter("@MothodName",         model.MothodName),
                new SqlParameter("@FKID",               model.FKID),
                new SqlParameter("@TransNo",            model.TransNo),
                new SqlParameter("@IsSend",             model.IsSend),
                new SqlParameter("@Message",            model.Message),
                new SqlParameter("@SendTime",           model.SendTime),
                new SqlParameter("@CreatUserID",        model.CreatUserID),
                new SqlParameter("@RecordUpdateUserID", model.RecordUpdateUserID),
                new SqlParameter("@RecordIsDelete",     model.RecordIsDelete),
                new SqlParameter("@RecordUpdateTime",   model.RecordUpdateTime),
                new SqlParameter("@RecordCreateTime",   model.RecordCreateTime)
            };
            object obj = BWJSLogHelperSQL.GetSingle(strSql.ToString(), parameters);

            if (obj == null)
            {
                return(0);
            }
            else
            {
                return(Convert.ToInt32(obj));
            }
        }
コード例 #2
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(BWJSLog.Model.SmsSendLog model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into SmsSendLog(");
            strSql.Append("SendResult,SmsTemplateId,SendType,SmsContent,Mobile,Status,IsDeleted,CreateDate,SendDate");
            strSql.Append(") values (");
            strSql.Append("@SendResult,@SmsTemplateId,@SendType,@SmsContent,@Mobile,@Status,@IsDeleted,@CreateDate,@SendDate");
            strSql.Append(") ");
            strSql.Append(";select SCOPE_IDENTITY()");
            SqlParameter[] parameters =
            {
                new SqlParameter("@SendResult",    model.SendResult),
                new SqlParameter("@SmsTemplateId", model.SmsTemplateId),
                new SqlParameter("@SendType",      model.SendType),
                new SqlParameter("@SmsContent",    model.SmsContent),
                new SqlParameter("@Mobile",        model.Mobile),
                new SqlParameter("@Status",        model.Status),
                new SqlParameter("@IsDeleted",     model.IsDeleted),
                new SqlParameter("@CreateDate",    model.CreateDate),
                new SqlParameter("@SendDate",      model.SendDate)
            };


            object obj = BWJSLogHelperSQL.GetSingle(strSql.ToString(), parameters);

            if (obj == null)
            {
                return(0);
            }
            else
            {
                return(Convert.ToInt32(obj));
            }
        }
コード例 #3
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(BWJSLog.Model.OperationLog model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into dbo.[OperationLog](");
            strSql.Append("DepartmentName,RoleId,RoleName,GroupId,GroupName,BusinessType,RelationId,LogContent,Ip,UserId,RealName,CreateDate,DepartmentId");
            strSql.Append(") values (");
            strSql.Append("@DepartmentName,@RoleId,@RoleName,@GroupId,@GroupName,@BusinessType,@RelationId,@LogContent,@Ip,@UserId,@RealName,@CreateDate,@DepartmentId");
            strSql.Append(") ");
            strSql.Append(";select SCOPE_IDENTITY()");
            SqlParameter[] parameters =
            {
                new SqlParameter("@DepartmentName", model.DepartmentName),
                new SqlParameter("@RoleId",         model.RoleId),
                new SqlParameter("@RoleName",       model.RoleName),
                new SqlParameter("@GroupId",        model.GroupId),
                new SqlParameter("@GroupName",      model.GroupName),
                new SqlParameter("@BusinessType",   model.BusinessType),
                new SqlParameter("@RelationId",     model.RelationId),
                new SqlParameter("@LogContent",     model.LogContent),
                new SqlParameter("@Ip",             model.Ip),
                new SqlParameter("@UserId",         model.UserId),
                new SqlParameter("@RealName",       model.RealName),
                new SqlParameter("@CreateDate",     model.CreateDate),
                new SqlParameter("@DepartmentId",   model.DepartmentId)
            };


            object obj = BWJSLogHelperSQL.GetSingle(strSql.ToString(), parameters);

            if (obj == null)
            {
                return(0);
            }
            else
            {
                return(Convert.ToInt32(obj));
            }
        }
コード例 #4
0
ファイル: ApiInvokingLogDAL.cs プロジェクト: hofmannzhu/bwjs
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(BWJSLog.Model.ApiInvokingLog model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into dbo.[ApiInvokingLog](");
            strSql.Append("ResponseDate,ResponseData,IsDeleted,CreateId,CreateDate,CompanyId,BusinessType,RelationId,ClassName,MethodName,ApiUrl,RequestDate,RequestData");
            strSql.Append(") values (");
            strSql.Append("@ResponseDate,@ResponseData,@IsDeleted,@CreateId,@CreateDate,@CompanyId,@BusinessType,@RelationId,@ClassName,@MethodName,@ApiUrl,@RequestDate,@RequestData");
            strSql.Append(") ");
            strSql.Append(";select SCOPE_IDENTITY()");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ResponseDate", model.ResponseDate),
                new SqlParameter("@ResponseData", model.ResponseData),
                new SqlParameter("@IsDeleted",    model.IsDeleted),
                new SqlParameter("@CreateId",     model.CreateId),
                new SqlParameter("@CreateDate",   model.CreateDate),
                new SqlParameter("@CompanyId",    model.CompanyId),
                new SqlParameter("@BusinessType", model.BusinessType),
                new SqlParameter("@RelationId",   model.RelationId),
                new SqlParameter("@ClassName",    model.ClassName),
                new SqlParameter("@MethodName",   model.MethodName),
                new SqlParameter("@ApiUrl",       model.ApiUrl),
                new SqlParameter("@RequestDate",  model.RequestDate),
                new SqlParameter("@RequestData",  model.RequestData)
            };


            object obj = BWJSLogHelperSQL.GetSingle(strSql.ToString(), parameters);

            if (obj == null)
            {
                return(0);
            }
            else
            {
                return(Convert.ToInt32(obj));
            }
        }
コード例 #5
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(BWJSLog.Model.XinboweinuoLog model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into dbo.[XinboweinuoLog](");
            strSql.Append("IsDeleted,CreateId,CreateDate,EditId,EditDate,NetLoanApplyId,ClassName,MethodName,ApiUrl,RequestDate,RequestData,ResponseDate,ResponseData");
            strSql.Append(") values (");
            strSql.Append("@IsDeleted,@CreateId,@CreateDate,@EditId,@EditDate,@NetLoanApplyId,@ClassName,@MethodName,@ApiUrl,@RequestDate,@RequestData,@ResponseDate,@ResponseData");
            strSql.Append(") ");
            strSql.Append(";select SCOPE_IDENTITY()");
            SqlParameter[] parameters =
            {
                new SqlParameter("@IsDeleted",      model.IsDeleted),
                new SqlParameter("@CreateId",       model.CreateId),
                new SqlParameter("@CreateDate",     model.CreateDate),
                new SqlParameter("@EditId",         model.EditId),
                new SqlParameter("@EditDate",       model.EditDate),
                new SqlParameter("@NetLoanApplyId", model.NetLoanApplyId),
                new SqlParameter("@ClassName",      model.ClassName),
                new SqlParameter("@MethodName",     model.MethodName),
                new SqlParameter("@ApiUrl",         model.ApiUrl),
                new SqlParameter("@RequestDate",    model.RequestDate),
                new SqlParameter("@RequestData",    model.RequestData),
                new SqlParameter("@ResponseDate",   model.ResponseDate),
                new SqlParameter("@ResponseData",   model.ResponseData)
            };


            object obj = BWJSLogHelperSQL.GetSingle(strSql.ToString(), parameters);

            if (obj == null)
            {
                return(0);
            }
            else
            {
                return(Convert.ToInt32(obj));
            }
        }
コード例 #6
0
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(BWJSLog.Model.MachineLocationLog model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into dbo.[MachineLocationLog](");
            strSql.Append("CreateDate,IsDeleted,Remark,UserId,MachineId,IP,MAC,Latitude,Longitude,LocationAddress,LocationData");
            strSql.Append(") values (");
            strSql.Append("@CreateDate,@IsDeleted,@Remark,@UserId,@MachineId,@IP,@MAC,@Latitude,@Longitude,@LocationAddress,@LocationData");
            strSql.Append(") ");
            strSql.Append(";select SCOPE_IDENTITY()");
            SqlParameter[] parameters =
            {
                new SqlParameter("@CreateDate",      model.CreateDate),
                new SqlParameter("@IsDeleted",       model.IsDeleted),
                new SqlParameter("@Remark",          model.Remark),
                new SqlParameter("@UserId",          model.UserId),
                new SqlParameter("@MachineId",       model.MachineId),
                new SqlParameter("@IP",              model.IP),
                new SqlParameter("@MAC",             model.MAC),
                new SqlParameter("@Latitude",        model.Latitude),
                new SqlParameter("@Longitude",       model.Longitude),
                new SqlParameter("@LocationAddress", model.LocationAddress),
                new SqlParameter("@LocationData",    model.LocationData)
            };


            object obj = BWJSLogHelperSQL.GetSingle(strSql.ToString(), parameters);

            if (obj == null)
            {
                return(0);
            }
            else
            {
                return(Convert.ToInt32(obj));
            }
        }