Beispiel #1
0
        public async static Task <(EDGameState gameState, UserJournal lastJournal)> LoadGameState(MSSQLDB db, Guid userIdentifier, List <UserJournal> userJournals, string integrationKey, PerformContext context)
        {
            EDGameState previousGameState = null;
            UserJournal lastJournal       = null;

            var firstAvailableGameState = userJournals.FirstOrDefault();

            if (firstAvailableGameState != null)
            {
                lastJournal = await db.ExecuteSingleRowAsync <UserJournal>(
                    "SELECT TOP 1 * FROM user_journal WHERE user_identifier = @user_identifier AND journal_id <= @journal_id AND last_processed_line_number > 0 AND integration_data IS NOT NULL ORDER BY journal_date DESC",
                    new SqlParameter("user_identifier", userIdentifier),
                    new SqlParameter("journal_id", firstAvailableGameState.JournalId)
                    );

                if (lastJournal != null && lastJournal.IntegrationData.ContainsKey(integrationKey))
                {
                    previousGameState = lastJournal.IntegrationData[integrationKey].CurrentGameState;

                    context.WriteLine($"Found previous gamestate: {JsonSerializer.Serialize(previousGameState, new JsonSerializerOptions { WriteIndented = true })}");
                }
            }

            return(previousGameState, lastJournal);
        }
Beispiel #2
0
        /// <summary>
        /// 获取当日详细内容
        /// </summary>
        public void GetTodayContent()
        {
            //string uid = string.Empty;
            string tempTime = System.DateTime.Now.ToString("yyyy-MM-dd");

            NetUserJournal uJourl   = new NetUserJournal();
            UserJournal    joulInfo = new UserJournal();

            joulInfo = uJourl.GetNetUserInfoByIds(UserId, tempTime);
            if (joulInfo != null)
            {
                this.txt_desc.Value = joulInfo.JourDesc;
                hid_isHave.Value    = joulInfo.JourID.ToString();//有值
                btn_Add.Enabled     = false;
                btn_reset.Disabled  = true;
                txt_desc.Disabled   = true;
            }
            else
            {
                btn_Add.Enabled    = true;
                btn_reset.Disabled = false;
                txt_desc.Disabled  = false;
                hid_isHave.Value   = "0";//没有值
            }
        }
        public async Task <IActionResult> Edit(int id, [Bind("ID,UserID,JournalEntry,DateCreated")] UserJournal userJournal)
        {
            if (id != userJournal.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(userJournal);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!UserJournalExists(userJournal.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(userJournal));
        }
        /// <summary>
        /// 更新用户日志信息
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public bool Update(UserJournal info)
        {
            bool _Result = true;

            try
            {
                OleDbParameter[] parms = new OleDbParameter[] {
                    new OleDbParameter(Parm_UserId, OleDbType.Integer),
                    new OleDbParameter(Parm_UserName, OleDbType.VarChar, 50),
                    new OleDbParameter(Parm_JourDesc, OleDbType.LongVarWChar),
                    //new OleDbParameter(Parm_WriteTime,OleDbType.Date),
                    new OleDbParameter(Parm_ModifyTime, OleDbType.Date)
                };
                parms[0].Value = info.UserID;
                parms[1].Value = info.UserName;
                parms[2].Value = info.JourDesc;
                //parms[3].Value = info.WriteTime;
                parms[3].Value = info.ModifyTime;

                string sql = string.Format(SQL_Update_UserJournal, info.JourID);
                AccessHelper.ExecuteNonQuery(AccessHelper.CONN_STRING, CommandType.Text, sql, parms);
            }
            catch (Exception ex)
            {
                _Result = false;
                throw ex;
            }

            return(_Result);
        }
Beispiel #5
0
        public ActionResult Add(int id, string returnUrl = "")
        {
            var currentUserId = Authentication.CurrentUserId;

            var existing = _userJournalRepository.Find(id, currentUserId);

            if (existing != null)
            {
                TempData[MyQoamMessage] = "This journal had already been added to My QOAM.";
            }
            else
            {
                var entity = new UserJournal
                {
                    UserProfileId = currentUserId,
                    JournalId     = id,
                    DateAdded     = DateTime.Now
                };

                _userJournalRepository.InsertOrUpdate(entity);
                _userJournalRepository.Save();

                TempData[MyQoamMessage] = "Journal has been added to My QOAM!";
            }

            return(string.IsNullOrWhiteSpace(returnUrl) ? (ActionResult)RedirectToAction("Details", "Journals", new { id }) : Redirect(returnUrl));
        }
        /// <summary>
        /// 获取用户的单个日志信息
        /// </summary>
        /// <param name="teachId"></param>
        /// <returns></returns>
        public UserJournal GetNetUserInfoByIds(string userId, string writetime)
        {
            UserJournal info = null;

            try
            {
                OleDbParameter[] parms = new OleDbParameter[] {
                    new OleDbParameter(Parm_UserId, OleDbType.Integer),
                    new OleDbParameter(Parm_WriteTime, OleDbType.VarChar, 50)
                };
                parms[0].Value = userId;
                parms[1].Value = writetime;
                using (OleDbDataReader sdr = AccessHelper.ExecuteReader(AccessHelper.CONN_STRING, CommandType.Text, SQL_Select_UserJournalPrimaryKey, parms))
                {
                    while (sdr.Read())
                    {
                        info = new UserJournal(
                            int.Parse(sdr["jourid"].ToString()),
                            int.Parse(sdr["userid"].ToString()),
                            sdr["username"].ToString(),
                            sdr["jourDesc"].ToString(),
                            DateTime.Parse(sdr["writetime"].ToString()),
                            DateTime.Parse(sdr["modifytime"].ToString()),
                            sdr["evalContent"].ToString()
                            );
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(info);
        }
        async Task <string> GetJournalContent(UserJournal journalItem)
        {
            if (journalItem == null)
            {
                return(null);
            }

            using (MemoryStream outFile = new MemoryStream())
            {
                var journalIdentifier = journalItem.S3Path;

                try
                {
                    var stats = await _minioClient.StatObjectAsync("journal-limpet", journalIdentifier);

                    await _minioClient.GetObjectAsync("journal-limpet", journalIdentifier,
                                                      0, stats.Size,
                                                      cb =>
                    {
                        cb.CopyTo(outFile);
                    }
                                                      );

                    outFile.Seek(0, SeekOrigin.Begin);

                    var journalContent = ZipManager.Unzip(outFile.ToArray());

                    return(journalContent);
                }
                catch (ObjectNotFoundException)
                {
                    return(null);
                }
            }
        }
Beispiel #8
0
        public static IntegrationJournalData GetIntegrationJournalData(UserJournal journalItem, UserJournal lastJournal, string integrationKey)
        {
            IntegrationJournalData ijd;

            if (journalItem.IntegrationData.ContainsKey(integrationKey))
            {
                ijd = journalItem.IntegrationData[integrationKey];
            }
            else
            {
                EDGameState oldState = null;

                if (lastJournal != null && lastJournal.IntegrationData != null && lastJournal.IntegrationData.ContainsKey(integrationKey) && lastJournal.IntegrationData[integrationKey].CurrentGameState != null)
                {
                    oldState = lastJournal.IntegrationData[integrationKey].CurrentGameState;
                }

                ijd = new IntegrationJournalData
                {
                    FullySent          = false,
                    LastSentLineNumber = 0,
                    CurrentGameState   = oldState ?? new EDGameState()
                };

                journalItem.IntegrationData.TryAdd(integrationKey, ijd);
            }

            ijd.CurrentGameState.SendEvents = true;
            return(ijd);
        }
Beispiel #9
0
        /// <summary>
        /// 导出到Word中
        /// </summary>
        public void ExportToDoc()
        {
            NetUserJournal uJoul     = new NetUserJournal();
            UserJournal    jourlInfo = new UserJournal();

            System.Data.DataTable dt    = uJoul.GetJournalDataSet(KeyWord, beginSearchDate, endSearchDate, 0, 1, true).Tables[0];
            StringBuilder         sbXml = new StringBuilder();
            string title = string.Empty;

            if (this.beginTime.Value == this.endTime.Value)
            {
                title = this.beginTime.Value + "工作总结内容列表";
            }
            else
            {
                title = this.drop_UserList.SelectedItem.Text + "从" + this.beginTime.Value + "到" + this.endTime.Value + "的工作总结内容列表";
            }
            sbXml.Append(title + "\t\t\t\t\n\n\n");
            foreach (DataRow row in dt.Rows)
            {
                sbXml.Append(row["realName"] + "\t" + Convert.ToDateTime(row["writetime"]).ToString("yyyy-MM-dd") + "\t\n");
                sbXml.Append(string.Format("{0}\n\n", row["jourDesc"]));
            }
            ExportData.ExportWebData("Word", title, sbXml);
        }
        private const string Parm_KeyWord = "@KeyWord";         //关键字

        #endregion

        #region 方法列表
        /// <summary>
        /// 添加用户日志信息
        /// </summary>
        /// <param name="info">传入UserJournal对象</param>
        /// <returns></returns>
        public bool Insert(UserJournal info)
        {
            bool _Result = true;

            try
            {
                OleDbParameter[] parms = new OleDbParameter[] {
                    new OleDbParameter(Parm_UserId, OleDbType.Integer),
                    new OleDbParameter(Parm_UserName, OleDbType.VarChar, 50),
                    new OleDbParameter(Parm_JourDesc, OleDbType.LongVarWChar),
                    new OleDbParameter(Parm_WriteTime, OleDbType.Date),
                    new OleDbParameter(Parm_ModifyTime, OleDbType.Date)
                };
                parms[0].Value = info.UserID;
                parms[1].Value = info.UserName;
                parms[2].Value = info.JourDesc;
                parms[3].Value = info.WriteTime;
                parms[4].Value = info.ModifyTime;

                AccessHelper.ExecuteNonQuery(AccessHelper.CONN_STRING, CommandType.Text, SQL_Insert_UserJournal, parms);
            }
            catch (Exception ex)
            {
                _Result = false;
            }

            return(_Result);
        }
        /// <summary>
        /// 获取数据信息
        /// </summary>
        /// <param name="jid"></param>
        public void GetData(string jid)
        {
            NetUserJournal nJourl = new NetUserJournal();
            UserJournal    uInfo  = new UserJournal();

            uInfo = nJourl.GetNetUserInfo(jid);
            if (uInfo != null)
            {
                this.txt_EvalDesc.Value = uInfo.EvalContent;
            }
        }
Beispiel #12
0
        /// <summary>
        /// 获取总结详细
        /// </summary>
        /// <param name="jid"></param>
        /// <returns></returns>
        public string GetJoulnalDetail(string jid, string isEdit)
        {
            UserJournal    jInfo  = new UserJournal();
            NetUserJournal uJourl = new NetUserJournal();

            if (isEdit == "1")
            {
                return(uJourl.GetNetUserInfo(jid).JourDesc);
            }
            else
            {
                return("<p>" + commonFun.replaceStr(uJourl.GetNetUserInfo(jid).JourDesc) + "</p>");
            }
        }
        public async Task <IActionResult> Create([Bind("ID,JournalEntry")] UserJournal userJournal)
        {
            userJournal.UserID = _userManager.GetUserId(User);

            userJournal.DateCreated = DateTime.Now;

            if (ModelState.IsValid)
            {
                _context.Add(userJournal);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(userJournal));
        }
        // Methods.
        private void TransferToAccount()
        {
            if (AccountInitiator.IsFrozen)
            {
                MessageBox.Show("Счёт отправителя заморожен");
                return;
            }
            if (AccountReceiver.IsFrozen)
            {
                MessageBox.Show("Счёт получателя заморожен");
                return;
            }

            if (!AccountModel.CheckAccountAmountToPossibilityOfTransfer(
                    AccountInitiator.CurrencyTypeModelNavigation.CurrencyTypeEnum,
                    OperationCurrencyType.CurrencyTypeEnum,
                    AccountInitiator.Amount,
                    AmountToTransfer))
            {
                MessageBox.Show("Сумма не должна превышать сумму" +
                                $" счёта: {AccountInitiator.Amount} {AccountInitiator.CurrencyType}");
                return;
            }

            var currencyConverter = ModelResourcesManager.GetInstance().CurrencyConverter;

            AccountInitiator.Amount -= currencyConverter.ConvertCurrencies(
                AccountInitiator.CurrencyTypeModelNavigation.CurrencyTypeEnum,
                OperationCurrencyType.CurrencyTypeEnum, AmountToTransfer);
            AccountReceiver.Amount += currencyConverter.ConvertCurrencies(
                AccountReceiver.CurrencyTypeModelNavigation.CurrencyTypeEnum,
                OperationCurrencyType.CurrencyTypeEnum, AmountToTransfer);
            JournalModel journalNote = new TransferToAccountModel()
            {
                UserId = AccountInitiator.UserId,
                Date   = DateTime.Now,
                BankAccountInitiator        = AccountInitiator.Id,
                BankAccountReceiver         = AccountReceiver.Id,
                CurrencyTypeModelNavigation = OperationCurrencyType,
                Amount = AmountToTransfer
            };

            UserJournal.Add(journalNote);
            ModelResourcesManager.GetInstance().GenerateTransfer(journalNote, AccountInitiator, AccountReceiver);

            MessageBox.Show("Успешно переведено");
        }
        public static async Task <string[]> LoadJournal(MinioClient _minioClient, UserJournal journalItem, MemoryStream outFile)
        {
            var stats = await _minioClient.StatObjectAsync("journal-limpet", journalItem.S3Path);

            await _minioClient.GetObjectAsync("journal-limpet", journalItem.S3Path,
                                              0, stats.Size,
                                              cb =>
            {
                cb.CopyTo(outFile);
            }
                                              );

            outFile.Seek(0, SeekOrigin.Begin);

            var journalContent = ZipManager.Unzip(outFile.ToArray());
            var journalRows    = journalContent.Trim().Split('\n', StringSplitOptions.RemoveEmptyEntries);

            return(journalRows);
        }
Beispiel #16
0
        /// <summary>
        /// 添加日志内容
        /// </summary>
        public void addJoual()
        {
            NetUserJournal uJoul    = new NetUserJournal();
            UserJournal    joulInfo = new UserJournal();

            joulInfo.JourDesc   = this.txt_desc.Value;
            joulInfo.UserName   = "";
            joulInfo.UserID     = int.Parse(Session["userid"].ToString());
            joulInfo.WriteTime  = System.DateTime.Now;
            joulInfo.ModifyTime = System.DateTime.Now;
            System.Threading.Thread.Sleep(1000);

            if (uJoul.Insert(joulInfo))
            {
                string tempStr = "";
                tempStr += "<script>";
                tempStr += "location='?uid=" + Session["userid"].ToString() + "';";;
                tempStr += "</script>";
                Page.ClientScript.RegisterStartupScript(this.GetType(), "startup", tempStr);
            }
        }
Beispiel #17
0
        private static async Task <bool> SendEventBatch(Guid userIdentifier, PerformContext context, IConfiguration configuration, DiscordWebhook discordClient, HttpClient hc, string lastLine, UserJournal journalItem, bool loggingEnabled, IntegrationJournalData ijd, List <Dictionary <string, object> > journalEvents)
        {
            var breakJournal = false;
            await SSEActivitySender.SendUserLogDataAsync(userIdentifier, new { fromIntegration = "Canonn R&D", data = journalEvents });

            var json = JsonSerializer.Serialize(journalEvents, new JsonSerializerOptions()
            {
                WriteIndented = true
            });

            if (loggingEnabled)
            {
                context.WriteLine($"Sent event:\n{json}");
            }

            var res = await SendEventsToCanonn(hc, configuration, json, context);

            switch (res.errorCode)
            {
            // These codes are OK
            case 200:
                break;

            // We're sending too many requests at once, let's break out of the loop and wait until next batch
            case 429:
                breakJournal = true;
                context.WriteLine("We're sending stuff too quickly, breaking out of the loop");
                context.WriteLine(lastLine);
                context.WriteLine(res.resultContent);

                await discordClient.SendMessageAsync("**[Canonn R&D Upload]** Rate limited by Canonn", new List <DiscordWebhookEmbed>
                {
                    new DiscordWebhookEmbed
                    {
                        Description = res.resultContent,
                        Fields      = new Dictionary <string, string>()
                        {
                            { "User identifier", userIdentifier.ToString() },
                            { "Last line", lastLine },
                            { "Journal", journalItem.S3Path },
                            { "Current GameState", JsonSerializer.Serialize(ijd.CurrentGameState, new JsonSerializerOptions {
                                    WriteIndented = true
                                }) }
                        }.Select(k => new DiscordWebhookEmbedField {
                            Name = k.Key, Value = k.Value
                        }).ToList()
                    }
                });

                await Task.Delay(30000);

                break;

            // Exceptions and debug
            case 500:     // Exception: %%
            case 501:     // %%
            case 502:     // Broken gateway
            case 503:
                breakJournal = true;
                context.WriteLine("We got an error from the service, breaking off!");
                context.WriteLine(lastLine);
                context.WriteLine(res.resultContent);

                await discordClient.SendMessageAsync("**[Canonn R&D Upload]** Error from the API", new List <DiscordWebhookEmbed>
                {
                    new DiscordWebhookEmbed
                    {
                        Description = res.resultContent,
                        Fields      = new Dictionary <string, string>()
                        {
                            { "User identifier", userIdentifier.ToString() },
                            { "Last line", lastLine },
                            { "Journal", journalItem.S3Path },
                            { "Current GameState", JsonSerializer.Serialize(ijd.CurrentGameState, new JsonSerializerOptions {
                                    WriteIndented = true
                                }) }
                        }.Select(k => new DiscordWebhookEmbedField {
                            Name = k.Key, Value = k.Value
                        }).ToList()
                    }
                });

                break;

            default:
                breakJournal = true;
                context.WriteLine("We got an error from the service, breaking off!");
                context.WriteLine(lastLine);
                context.WriteLine(res.resultContent);

                await discordClient.SendMessageAsync("**[Canonn R&D Upload]** Unhandled response code", new List <DiscordWebhookEmbed>
                {
                    new DiscordWebhookEmbed
                    {
                        Description = res.resultContent,
                        Fields      = new Dictionary <string, string>()
                        {
                            { "User identifier", userIdentifier.ToString() },
                            { "Last line", lastLine },
                            { "Journal", journalItem.S3Path },
                            { "Current GameState", JsonSerializer.Serialize(ijd.CurrentGameState, new JsonSerializerOptions {
                                    WriteIndented = true
                                }) }
                        }.Select(k => new DiscordWebhookEmbedField {
                            Name = k.Key, Value = k.Value
                        }).ToList()
                    }
                });

                break;
            }

            return(breakJournal);
        }
Beispiel #18
0
        /// <summary>
        /// 获取信息
        /// </summary>
        /// <param name="isSearch"></param>
        public void GetInfoList(bool isSearch)
        {
            NetUserJournal uJourl = new NetUserJournal();
            UserJournal    joul   = new UserJournal();

            #region 分页处理

            if (this.beginTime.Value.Trim() == "" || this.endTime.Value.Trim() == "")
            {
                this.endTime.Value   = System.DateTime.Now.ToString("yyyy-MM-dd");
                this.beginTime.Value = System.DateTime.Now.AddDays(-6).ToString("yyyy-MM-dd");
            }

            if (isSearch)
            {
                beginSearchDate = Convert.ToDateTime(this.beginTime.Value).ToString("yyyy-MM-dd");
                endSearchDate   = Convert.ToDateTime(this.endTime.Value).ToString("yyyy-MM-dd");
                UserId          = this.drop_UserList.SelectedValue;
            }
            else
            {
                if (Request.QueryString["bd"] != null && Request.QueryString["ed"] != null)
                {
                    try
                    {
                        beginSearchDate = Convert.ToDateTime(Request.QueryString["bd"]).ToString("yyyy-MM-dd");
                        endSearchDate   = Convert.ToDateTime(Request.QueryString["ed"]).ToString("yyyy-MM-dd");
                    }
                    catch
                    {
                        beginSearchDate = System.DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
                        endSearchDate   = System.DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
                    }
                }
                else
                {
                    beginSearchDate = Convert.ToDateTime(this.beginTime.Value).ToString("yyyy-MM-dd");
                    endSearchDate   = Convert.ToDateTime(this.endTime.Value).ToString("yyyy-MM-dd");
                }
            }
            this.beginTime.Value = beginSearchDate;
            this.endTime.Value   = endSearchDate;

            int userCount   = uJourl.GetJournalFYCount(UserId, beginSearchDate, endSearchDate);//获取分页总数
            int currentPage = 1;
            try
            {
                if (!isSearch)
                {
                    currentPage = Convert.ToInt32(Request.QueryString["page"]);
                    if (currentPage > (userCount + PageSize - 1) / PageSize)
                    {
                        currentPage = (userCount + PageSize - 1) / PageSize;
                    }

                    if (currentPage <= 0)
                    {
                        currentPage = 1;
                    }
                }
            }
            catch
            {
                currentPage = 1;
            }

            #endregion

            if (beginSearchDate == endSearchDate)
            {
                tempTitle = beginSearchDate;
            }
            else
            {
                tempTitle = "从" + beginSearchDate + "到" + endSearchDate;
            }
            tempTitle += "&nbsp;[" + this.drop_UserList.SelectedItem.Text + "]&nbsp;&nbsp;的总结列表";

            DataSet      ds   = uJourl.GetJournalDataSet(UserId, beginSearchDate, endSearchDate, PageSize, currentPage, false);
            HtmlTableRow hrow = null;
            if (ds != null)
            {
                int uCount = ds.Tables[0].Rows.Count;
                if (uCount > 0)
                {
                    for (int i = 0; i < uCount; i++)
                    {
                        hrow = new HtmlTableRow();
                        string tempEval = "";
                        hrow.Attributes.Add("class", "tr_row1");
                        string time = ds.Tables[0].Rows[i]["writetime"].ToString();
                        hrow.Cells.Add(GetHCell("<div class='posttitle' style='text-align:left;'>日期:" + Convert.ToDateTime(time).ToString("yyyy/MM/dd H:mm") + "<span style='padding-left:30px;'>" + commonFun.getDate(time) + "</span></div>", false));
                        tbl_list.Rows.Add(hrow);
                        hrow = new HtmlTableRow();
                        if (!string.IsNullOrEmpty(ds.Tables[0].Rows[i]["evalContent"].ToString()))
                        {
                            tempEval += "<div id='div_EvalContent'><div>总结小评:" + commonFun.replaceStr(ds.Tables[0].Rows[i]["evalContent"].ToString()) + "</div></div>";
                        }
                        hrow.Cells.Add(GetHCell("<div style='text-align:left;padding-left:20px;padding-top:5px;'>" + commonFun.replaceStr(ds.Tables[0].Rows[i]["jourDesc"].ToString()) + "</div>" + tempEval, false));

                        tbl_list.Rows.Add(hrow);
                    }
                }
                else
                {
                    hrow = new HtmlTableRow();
                    string        tempNo = "温馨提示:没有总结信息!";
                    HtmlTableCell cell   = GetHCell(tempNo, false);
                    hrow.Cells.Add(cell);
                    tbl_list.Rows.Add(hrow);
                }
            }

            string parms = "&bd=" + beginSearchDate + "&ed=" + endSearchDate + "&uid=" + UserId;
            GetPage(userCount, PageSize, currentPage, parms);//获取分页文字
        }
Beispiel #19
0
        /// <summary>
        /// 获取当天日志数据
        /// </summary>
        public void GetJournalList(bool IsSearch)
        {
            NetUserJournal uJourl = new NetUserJournal();
            UserJournal    joul   = new UserJournal();

            #region 分页判断处理
            if (IsSearch)
            {
                beginSearchDate = Convert.ToDateTime(this.beginTime.Value).ToString("yyyy-MM-dd");
                endSearchDate   = Convert.ToDateTime(this.endTime.Value).ToString("yyyy-MM-dd");
                KeyWord         = this.drop_UserList.SelectedValue;//用户ID
            }
            else
            {
                if (Request.QueryString["bd"] != null && Request.QueryString["ed"] != null && Request.QueryString["uid"] != null)
                {
                    KeyWord = Request.QueryString["uid"];
                    try
                    {
                        beginSearchDate = Convert.ToDateTime(Request.QueryString["bd"]).ToString("yyyy-MM-dd");
                        endSearchDate   = Convert.ToDateTime(Request.QueryString["ed"]).ToString("yyyy-MM-dd");
                    }
                    catch
                    {
                        beginSearchDate = System.DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
                        endSearchDate   = System.DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
                    }
                }
                else
                {
                    //beginSearchDate = System.DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
                    //endSearchDate = System.DateTime.Now.AddDays(-1).ToString("yyyy-MM-dd");
                    beginSearchDate = Convert.ToDateTime(this.beginTime.Value).ToString("yyyy-MM-dd");
                    endSearchDate   = Convert.ToDateTime(this.endTime.Value).ToString("yyyy-MM-dd");
                    KeyWord         = this.drop_UserList.SelectedValue;//用户ID
                }
            }
            this.beginTime.Value             = beginSearchDate;
            this.endTime.Value               = endSearchDate;
            this.drop_UserList.SelectedValue = KeyWord;
            int _currentPage = Convert.ToInt32(Request.QueryString["page"]);
            if (!IsSearch && _currentPage <= 0)
            {
                KeyWord = string.Empty;
            }
            if (beginSearchDate == endSearchDate)
            {
                //KeyWord = string.Empty;
                tempTitle = beginSearchDate;
            }
            else
            {
                tempTitle = "从" + beginSearchDate + "到" + endSearchDate;
            }
            tempTitle += "总结列表";

            int userCount   = uJourl.GetJournalFYCount(KeyWord, beginSearchDate, endSearchDate);//获取分页总数
            int currentPage = 1;
            try
            {
                currentPage = Convert.ToInt32(Request.QueryString["page"]);
                if (currentPage > (userCount + PageSize - 1) / PageSize)
                {
                    currentPage = (userCount + PageSize - 1) / PageSize;
                }

                if (currentPage <= 0)
                {
                    currentPage = 1;
                }
            }
            catch
            {
                currentPage = 1;
            }

            #endregion

            DataSet ds = uJourl.GetJournalDataSet(KeyWord, beginSearchDate, endSearchDate, PageSize, currentPage, false);

            if (ds != null)
            {
                int          uCount = ds.Tables[0].Rows.Count;
                HtmlTableRow hrow   = null;
                string       today  = System.DateTime.Now.ToString("yyyy-MM-dd");

                hrow = new HtmlTableRow();
                HtmlTableCell cel1 = GetHCell("提交人", true);
                cel1.Width = "70";
                hrow.Cells.Add(cel1);

                hrow.Cells.Add(GetHCell("总结内容", true));
                if (beginSearchDate == today)
                {
                    HtmlTableCell cel2 = GetHCell("操作", true);
                    cel2.Width = "125";
                    hrow.Cells.Add(cel2);
                }
                //else
                //{
                //    HtmlTableCell cel3 = GetHCell("提交日期", true);
                //    cel3.Width = "125";
                //    hrow.Cells.Add(cel3);
                //}
                tbl_list.Rows.Add(hrow);

                if (uCount > 0)
                {
                    string tempOpreator = string.Empty;
                    for (int j = 0; j < uCount; j++)
                    {
                        hrow = new HtmlTableRow();
                        int tempBH = (currentPage - 1) * PageSize + j + 1;
                        //hrow.Cells.Add(GetHCell(tempBH.ToString()));//编号
                        hrow.Cells.Add(GetHCell(ds.Tables[0].Rows[j]["realName"].ToString(), false));//真实姓名
                        //string tempDesc = commonFun.GetContentSummary(ds.Tables[0].Rows[j][3].ToString(), 40, true);

                        //hrow.Cells.Add(GetHCell(ds.Tables[0].Rows[j][4].ToString()));//写入时间
                        tempOpreator = string.Empty;
                        string tempEval = "";
                        if (!string.IsNullOrEmpty(ds.Tables[0].Rows[j]["evalContent"].ToString()))
                        {
                            tempEval += "<div id='div_EvalContent'><span id='sp_pjtitle" + tempBH + "'>总结小评:</span><span id='sp_tempPj" + tempBH + "'>" + commonFun.replaceStr(ds.Tables[0].Rows[j]["evalContent"].ToString()) + "</span></div>";
                        }
                        else
                        {
                            tempEval += "<div id='div_EvalContent'><span id='sp_pjtitle" + tempBH + "' style='display:none;'>总结小评:</span><span id='sp_tempPj" + tempBH + "'>" + commonFun.replaceStr(ds.Tables[0].Rows[j]["evalContent"].ToString()) + "</span></div>";
                        }
                        //tempOpreator = "<a href=\"javascript:void(0);\" name=\"view\" onclick=\"showDiv('" + ds.Tables[0].Rows[j][0].ToString() + "','0','" + tempBH + "')\">查看详细</a>";
                        if (beginSearchDate == today)
                        {
                            string tempDesc = commonFun.replaceStr(ds.Tables[0].Rows[j][3].ToString());


                            hrow.Cells.Add(GetHCell("<div style='text-align:left;line-height:22px;padding-left:5px;' id='div_tempContent" + tempBH + "'>" + tempDesc + "</div>" + tempEval + "<div style='padding-top:5px;font-size:14px;text-align:left;padding-left:5px;'><span style='color:red;' onclick=\"setTxt('div_tempContent" + tempBH + "')\">[复制]</span><span style='color:red;padding-left:10px;padding-right:10px;'><a href=\"javascript:void(0);\" onclick=\"showEvalDiv('" + ds.Tables[0].Rows[j][0].ToString() + "','" + tempBH + "')\">评论</a></span>提交日期:" + Convert.ToDateTime(ds.Tables[0].Rows[j][4].ToString()).ToString("yyyy/MM/dd H:mm") + "</div>", false));//总结描述

                            tempOpreator += "&nbsp;<a href=\"javascript:void(0);\" onclick=\"showDiv('" + ds.Tables[0].Rows[j][0].ToString() + "','1','" + tempBH + "')\">修改</a>";
                            tempOpreator += "&nbsp;<a href=\"javascript:void(0);\" onclick=\"deldata('" + ds.Tables[0].Rows[j][0].ToString() + "','" + ds.Tables[0].Rows[j][1].ToString() + "')\">删除</a>";
                            //tempOpreator += "&nbsp;<a href=\"javascript:void(0);\" onclick=\"evaldata('" + ds.Tables[0].Rows[j][0].ToString() + "','" + ds.Tables[0].Rows[j][1].ToString() + "')\">评论</a>";
                            hrow.Cells.Add(GetHCell(tempOpreator, false));//操作内容
                        }
                        else
                        {
                            string tempDesc = commonFun.replaceStr(ds.Tables[0].Rows[j][3].ToString());


                            hrow.Cells.Add(GetHCell("<div style='text-align:left;line-height:22px;padding-left:10px;' id='div_tempContent" + tempBH + "'>" + tempDesc + "</div>" + tempEval + "<div style='padding-top:5px;text-align:left;padding-left:5px;'><span style='padding-left:5px;color:red;' onclick=\"setTxt('div_tempContent" + tempBH + "')\">[复制]</span><span style='color:red;padding-left:10px;padding-right:10px;'><a href=\"javascript:void(0);\" onclick=\"showEvalDiv('" + ds.Tables[0].Rows[j][0].ToString() + "','" + tempBH + "')\">评论</a></span>提交日期:" + Convert.ToDateTime(ds.Tables[0].Rows[j][4].ToString()).ToString("yyyy/MM/dd H:mm") + "</div>", false));//总结描述
                            //tempOpreator = Convert.ToDateTime(ds.Tables[0].Rows[j][4].ToString()).ToString("yyyy/MM/dd hh:mm");
                            //hrow.Cells.Add(GetHCell(tempOpreator, false));//操作内容
                        }


                        tbl_list.Rows.Add(hrow);
                    }
                }
                else
                {
                    hrow = new HtmlTableRow();
                    string        tempNo = "温馨提示:没有总结信息!";
                    HtmlTableCell cell   = GetHCell(tempNo, false);
                    if (beginSearchDate == today)
                    {
                        cell.Attributes.Add("colspan", "3");
                    }
                    else
                    {
                        cell.Attributes.Add("colspan", "2");
                    }
                    hrow.Cells.Add(cell);
                    tbl_list.Rows.Add(hrow);
                }
            }
            string parms = "&bd=" + beginSearchDate + "&ed=" + endSearchDate + "&uid=" + KeyWord;
            GetPage(userCount, PageSize, currentPage, parms);//获取分页文字
        }