示例#1
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public BWJSLog.Model.OperationLog GetModel(int OperationLogId)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select OperationLogId, DepartmentName, RoleId, RoleName, GroupId, GroupName, BusinessType, RelationId, LogContent, Ip, UserId, RealName, CreateDate, DepartmentId  ");
            strSql.Append("  from dbo.[OperationLog] ");
            strSql.Append(" where OperationLogId=@OperationLogId");
            SqlParameter[] parameters =
            {
                new SqlParameter("@OperationLogId", SqlDbType.Int, 4)
            };
            parameters[0].Value = OperationLogId;


            BWJSLog.Model.OperationLog model = new BWJSLog.Model.OperationLog();
            DataSet ds = BWJSLogHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
示例#2
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public BWJSLog.Model.ApiInvokingLog GetModel(int ApiInvokingLogId)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select ApiInvokingLogId, ResponseDate, ResponseData, IsDeleted, CreateId, CreateDate, CompanyId, BusinessType, RelationId, ClassName, MethodName, ApiUrl, RequestDate, RequestData  ");
            strSql.Append("  from dbo.[ApiInvokingLog] ");
            strSql.Append(" where ApiInvokingLogId=@ApiInvokingLogId");
            SqlParameter[] parameters =
            {
                new SqlParameter("@ApiInvokingLogId", SqlDbType.Int, 4)
            };
            parameters[0].Value = ApiInvokingLogId;


            BWJSLog.Model.ApiInvokingLog model = new BWJSLog.Model.ApiInvokingLog();
            DataSet ds = BWJSLogHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
示例#3
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public BWJSLog.Model.SmsSendLog GetModel(int SmsLogId)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select SmsLogId, SendResult, SmsTemplateId, SendType, SmsContent, Mobile, Status, IsDeleted, CreateDate, SendDate  ");
            strSql.Append("  from SmsSendLog ");
            strSql.Append(" where SmsLogId=@SmsLogId");
            SqlParameter[] parameters =
            {
                new SqlParameter("@SmsLogId", SqlDbType.Int, 4)
            };
            parameters[0].Value = SmsLogId;


            BWJSLog.Model.SmsSendLog model = new BWJSLog.Model.SmsSendLog();
            DataSet ds = BWJSLogHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
示例#4
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public BWJSLog.Model.MachineLocationLog GetModel(int MachineLocationLogId)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select MachineLocationLogId, CreateDate, IsDeleted, Remark, UserId, MachineId, IP, MAC, Latitude, Longitude, LocationAddress, LocationData  ");
            strSql.Append("  from dbo.[MachineLocationLog] ");
            strSql.Append(" where MachineLocationLogId=@MachineLocationLogId");
            SqlParameter[] parameters =
            {
                new SqlParameter("@MachineLocationLogId", SqlDbType.Int, 4)
            };
            parameters[0].Value = MachineLocationLogId;


            BWJSLog.Model.MachineLocationLog model = new BWJSLog.Model.MachineLocationLog();
            DataSet ds = BWJSLogHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
示例#5
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public BWJSLog.Model.XinboweinuoLog GetModel(int XinboweinuoLogId)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select XinboweinuoLogId, IsDeleted, CreateId, CreateDate, EditId, EditDate, NetLoanApplyId, ClassName, MethodName, ApiUrl, RequestDate, RequestData, ResponseDate, ResponseData  ");
            strSql.Append("  from dbo.[XinboweinuoLog] ");
            strSql.Append(" where XinboweinuoLogId=@XinboweinuoLogId");
            SqlParameter[] parameters =
            {
                new SqlParameter("@XinboweinuoLogId", SqlDbType.Int, 4)
            };
            parameters[0].Value = XinboweinuoLogId;


            BWJSLog.Model.XinboweinuoLog model = new BWJSLog.Model.XinboweinuoLog();
            DataSet ds = BWJSLogHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
示例#6
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select * ");
            strSql.Append(" FROM dbo.[OperationLog] ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return(BWJSLogHelperSQL.Query(strSql.ToString()));
        }
示例#7
0
        /// <summary>
        /// 获得前几行数据
        /// </summary>
        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select ");
            if (Top > 0)
            {
                strSql.Append(" top " + Top.ToString());
            }
            strSql.Append(" * ");
            strSql.Append(" FROM dbo.[OperationLog] ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            strSql.Append(" order by " + filedOrder);
            return(BWJSLogHelperSQL.Query(strSql.ToString()));
        }
示例#8
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public MofangSendLog GetModel(int MofangSendLogID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select MofangSendLogID, MothodName, FKID, TransNo, IsSend, Message, SendTime, CreatUserID, RecordUpdateUserID, RecordIsDelete, RecordUpdateTime, RecordCreateTime  ");
            strSql.Append("  from MofangSendLog ");
            strSql.Append(" where MofangSendLogID=@MofangSendLogID");
            SqlParameter[] parameters =
            {
                new SqlParameter("@MofangSendLogID", SqlDbType.Int, 4)
            };
            parameters[0].Value = MofangSendLogID;


            MofangSendLog model = new MofangSendLog();
            DataSet       ds    = BWJSLogHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["MofangSendLogID"].ToString() != "")
                {
                    model.MofangSendLogID = int.Parse(ds.Tables[0].Rows[0]["MofangSendLogID"].ToString());
                }
                model.MothodName = ds.Tables[0].Rows[0]["MothodName"].ToString();
                if (ds.Tables[0].Rows[0]["FKID"].ToString() != "")
                {
                    model.FKID = int.Parse(ds.Tables[0].Rows[0]["FKID"].ToString());
                }
                model.TransNo = ds.Tables[0].Rows[0]["TransNo"].ToString();
                if (ds.Tables[0].Rows[0]["IsSend"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["IsSend"].ToString() == "1") || (ds.Tables[0].Rows[0]["IsSend"].ToString().ToLower() == "true"))
                    {
                        model.IsSend = true;
                    }
                    else
                    {
                        model.IsSend = false;
                    }
                }
                model.Message = ds.Tables[0].Rows[0]["Message"].ToString();
                if (ds.Tables[0].Rows[0]["SendTime"].ToString() != "")
                {
                    model.SendTime = DateTime.Parse(ds.Tables[0].Rows[0]["SendTime"].ToString());
                }
                if (ds.Tables[0].Rows[0]["CreatUserID"].ToString() != "")
                {
                    model.CreatUserID = int.Parse(ds.Tables[0].Rows[0]["CreatUserID"].ToString());
                }
                if (ds.Tables[0].Rows[0]["RecordUpdateUserID"].ToString() != "")
                {
                    model.RecordUpdateUserID = int.Parse(ds.Tables[0].Rows[0]["RecordUpdateUserID"].ToString());
                }
                if (ds.Tables[0].Rows[0]["RecordIsDelete"].ToString() != "")
                {
                    if ((ds.Tables[0].Rows[0]["RecordIsDelete"].ToString() == "1") || (ds.Tables[0].Rows[0]["RecordIsDelete"].ToString().ToLower() == "true"))
                    {
                        model.RecordIsDelete = true;
                    }
                    else
                    {
                        model.RecordIsDelete = false;
                    }
                }
                if (ds.Tables[0].Rows[0]["RecordUpdateTime"].ToString() != "")
                {
                    model.RecordUpdateTime = DateTime.Parse(ds.Tables[0].Rows[0]["RecordUpdateTime"].ToString());
                }
                if (ds.Tables[0].Rows[0]["RecordCreateTime"].ToString() != "")
                {
                    model.RecordCreateTime = DateTime.Parse(ds.Tables[0].Rows[0]["RecordCreateTime"].ToString());
                }

                return(model);
            }
            else
            {
                return(null);
            }
        }