コード例 #1
0
        /// <summary>
        /// 按照查询条件查询操作日志数据
        /// </summary>
        /// <param name="query">查询条件</param>
        /// <param name="order">排序</param>
        /// <param name="currentPage">页号,-1不分页</param>
        /// <param name="pageSize">每页记录数</param>
        /// <param name="totalCount">总行数</param>
        /// <returns>集合</returns>
        public DataTable GetYTGActivityTaskOperationLog(YTGActivityTaskLogInfo query, string order, int currentPage, int pageSize, out int totalCount)
        {
            string where = string.Empty;

            DataSet ds;

            where += " and OperationStatus!=-2 and TaskStatus!=-2";
            if (query.TaskID != Constant.STRING_INVALID_VALUE)
            {
                where += " and TaskID='" + StringHelper.SqlFilter(query.TaskID) + "'";
            }

            SqlParameter[] parameters =
            {
                new SqlParameter("@where",         SqlDbType.NVarChar, 40000),
                new SqlParameter("@order",         SqlDbType.NVarChar,   200),
                new SqlParameter("@pagesize",      SqlDbType.Int,          4),
                new SqlParameter("@indexpage",     SqlDbType.Int,          4),
                new SqlParameter("@totalRecorder", SqlDbType.Int, 4)
            };

            parameters[0].Value     = where;
            parameters[1].Value     = order;
            parameters[2].Value     = pageSize;
            parameters[3].Value     = currentPage;
            parameters[4].Direction = ParameterDirection.Output;

            ds         = SqlHelper.ExecuteDataset(CONNECTIONSTRINGS, CommandType.StoredProcedure, "p_YTGActivityTaskOperationLog_Select", parameters);
            totalCount = (int)(parameters[4].Value);
            return(ds.Tables[0]);
        }
コード例 #2
0
        //分配或收回操作
        private void operLeads(string taskID, DateTime dtNow, int userID, string desc)
        {
            int    loginid         = BLL.Util.GetLoginUserID();
            int    nStatus         = 1;
            string strAssignUserID = string.Empty;

            if (desc == "分配")
            {
                strAssignUserID = userID.ToString();
                nStatus         = (int)Entities.YTGActivityTaskStatus.NoProcess;
            }
            else
            {
                //回收
                strAssignUserID = "-2";
                nStatus         = (int)Entities.YTGActivityTaskStatus.NoAllocation;
            }

            BLL.YTGActivityTask.Instance.UpdateYTGTaskStatus(taskID, strAssignUserID, loginid, nStatus);

            //插入日志
            YTGActivityTaskLogInfo loginfo = new YTGActivityTaskLogInfo();

            loginfo.TaskID = taskID;
            //记录本次操作的动作
            loginfo.OperationStatus = desc == "分配"
                ? (int)Entities.YTGActivityOperationStatus.Allocation
                : (int)Entities.YTGActivityOperationStatus.Recover;

            //记录操作完成后任务的状态。
            loginfo.TaskStatus = desc == "分配"
                ? (int)Entities.YTGActivityTaskStatus.NoProcess
                : (int)Entities.YTGActivityTaskStatus.NoAllocation;

            loginfo.Remark     = desc;
            loginfo.CreateTime = DateTime.Now;
            BLL.YTGActivityTaskLog.Instance.InsertComAdoInfo <YTGActivityTaskLogInfo>(loginfo);
        }
コード例 #3
0
 /// <summary>
 /// 按照查询条件查询
 /// </summary>
 /// <param name="query">查询条件</param>
 /// <param name="order">排序</param>
 /// <param name="currentPage">页号,-1不分页</param>
 /// <param name="pageSize">每页记录数</param>
 /// <param name="totalCount">总行数</param>
 /// <returns>集合</returns>
 public DataTable GetYTGActivityTaskOperationLog(YTGActivityTaskLogInfo query, string order, int currentPage, int pageSize, out int totalCount)
 {
     return(Dal.YTGActivityTaskLog.Instance.GetYTGActivityTaskOperationLog(query, order, currentPage, pageSize, out totalCount));
 }