/// <summary>
        /// 跟新任务完成进度
        /// </summary>
        /// <param name="type">类型</param>
        /// <param name="uid">用户编号</param>
        /// <param name="missionId">任务编号</param>
        /// <returns>返回值 1 表示更新成功,0 表示更新失败</returns>
        public string updateMission(string type, int uid, int missionId)
        {
            string         tempStr = "0";
            NetUserMission netBll  = new NetUserMission();

            if (type == "first")
            {
                if (netBll.UpdateSome(missionId, uid, false))
                {
                    tempStr = "1";
                }
            }
            else if (type == "second")
            {
                if (netBll.UpdateSome(missionId, uid, true))
                {
                    tempStr = "1";
                }
            }
            else if (type == "update")
            {
                if (netBll.UpdateUser(missionId, uid))
                {
                    tempStr = "1";
                }
            }
            return(tempStr);
        }
        /// <summary>
        /// 添加任务
        /// </summary>
        /// <param name="uid"></param>
        /// <param name="uname"></param>
        /// <returns></returns>
        public string AddMission(int uid, string desc, int workHour, string type, string path)
        {
            string         tempstr     = string.Empty;
            NetUserMission MissionBLL  = new NetUserMission();
            UserMission    MissionInfo = new UserMission();



            MissionInfo.UserID       = uid;
            MissionInfo.MissionDesc  = desc;
            MissionInfo.WorkHour     = workHour;
            MissionInfo.WriteDate    = System.DateTime.Now;
            MissionInfo.MissionTitle = "";
            MissionInfo.ExecStatus   = "0";
            MissionInfo.MissionType  = type;
            MissionInfo.FilePath     = path;

            if (MissionBLL.Insert(MissionInfo))
            {
                tempstr = "1";
            }
            else
            {
                tempstr = "0";
            }
            return(tempstr);
        }
        /// <summary>
        /// 导出到Word中
        /// </summary>
        public void ExportToDoc()
        {
            NetUserMission uMission = new NetUserMission();
            UserMission    uinfo    = new UserMission();

            DataTable     dt    = uMission.GetMissionDataSet("2", beginSearchDate, endSearchDate, KeyWord).Tables[0];
            StringBuilder sbXml = new StringBuilder();
            string        title = string.Empty;

            if (this.beginTime.Value == this.endTime.Value)
            {
                title = this.beginTime.Value + "工作任务列表";
            }
            else
            {
                title = "从" + this.beginTime.Value + "到" + this.endTime.Value + "的修改完成的列表";
            }
            sbXml.Append(title + "\t\t\t\t\n\n\n");
            sbXml.Append("编号\t\t\t\t任务内容\n\n");
            foreach (DataRow row in dt.Rows)
            {
                sbXml.Append(string.Format("{0}", "1"));

                sbXml.Append(string.Format("\t\t\t\t{0}\n\n", row["MissionDesc"]));
            }
            ExportData.ExportWebData("Word", title, sbXml);
        }
Beispiel #4
0
        /// <summary>
        /// 获取数据信息
        /// </summary>
        /// <param name="jid"></param>
        public void GetData(string mid)
        {
            NetUserMission uMission = new NetUserMission();
            UserMission    uInfo    = new UserMission();

            uInfo = uMission.GetNetMissionInfo(mid);
            if (uInfo != null)
            {
                this.txt_EvalDesc.Value       = commonFun.EnReplaceStr(uInfo.MissionDesc);
                this.drop_type.SelectedValue  = uInfo.MissionType;
                this.TextBox_workHour.Text    = uInfo.WorkHour.ToString();
                this.TextBox_realProcess.Text = uInfo.RealProcess.Trim();
            }
        }
        /// <summary>
        /// 根据用户ID和任务ID删除
        /// </summary>
        /// <param name="uid"></param>
        /// <param name="missionId"></param>
        /// <returns></returns>
        public string DeleteMission(int uid, int missionId, string path)
        {
            string         tempStr = "0";
            NetUserMission netBll  = new NetUserMission();

            if (netBll.Delete(uid, missionId))
            {
                string fullpath = HttpContext.Current.Server.MapPath(path);
                if (System.IO.File.Exists(fullpath))
                {
                    System.IO.File.Delete(fullpath);
                }
                tempStr = "1";
            }
            return(tempStr);
        }
        public void GetMissionDetail(string mid)
        {
            NetUserMission uMission = new NetUserMission();
            UserMission    uinfo    = new UserMission();

            uinfo = uMission.GetNetMissionInfo(mid);
            if (uinfo != null)
            {
                this.div_desc.InnerHtml           = uinfo.MissionDesc;
                this.radio_UserList.SelectedValue = uinfo.UserID.ToString();
                hidSelectUser.Value = uinfo.UserID.ToString();
            }
            else
            {
                this.radio_UserList.SelectedValue = "0";
            }
        }
        public string UpdateMissionDesc(string desc, string missionId, string sType, string sworkHour, string sRealProcess)
        {
            string tempStr = "0";

            if (sRealProcess.Trim() == "0")
            {
                sRealProcess = string.Empty;
            }
            if (sRealProcess.Trim() != string.Empty)
            {
                sRealProcess = sRealProcess.Trim() + "%";
            }

            NetUserMission netBll = new NetUserMission();

            if (netBll.UpdateDesc(missionId, desc, sType, sworkHour, sRealProcess))
            {
                tempStr = "1";
            }
            return(tempStr);
        }
        public void ExportToDocByOffice()
        {
            NetUserMission uMission = new NetUserMission();

            string title = string.Empty;

            if (this.beginTime.Value == this.endTime.Value)
            {
                title = this.beginTime.Value + "工作任务列表";
            }
            else
            {
                title = "从" + this.beginTime.Value + "到" + this.endTime.Value + "的修改完成的列表";
            }

            DataTable dt = uMission.GetMissionDataSet("2", beginSearchDate, endSearchDate, KeyWord).Tables[0];

            NetChina.Common.ExportData.CreateWordFile(title, dt);

            string name = NetChina.Common.commonFun.uploadFile + "temp/已经完成任务列表.doc";

            NetChina.Common.ExportData.DoadLoadFile(Server.MapPath(name));
        }
        /// <summary>
        /// 获取数据集合
        /// </summary>
        /// <param name="IsSearch"></param>
        public void GetMissionList(bool IsSearch)
        {
            NetUserMission misBll  = new NetUserMission();
            UserMission    misInfo = new UserMission();

            #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");
                beginSearchDate      = this.beginTime.Value;
                endSearchDate        = this.endTime.Value;
            }

            if (IsSearch)
            {
                beginSearchDate = Convert.ToDateTime(this.beginTime.Value).ToString("yyyy-MM-dd");
                endSearchDate   = Convert.ToDateTime(this.endTime.Value).ToString("yyyy-MM-dd");
                Status          = this.drop_Status.SelectedValue;
                UserId          = this.drop_UserList.SelectedValue;
                TypeMission     = this.drop_type.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   = misBll.GetMissionFYCount(UserId, Status, beginSearchDate, endSearchDate, "1", false, "", TypeMission);//获取分页总数
            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
            tempTitle = "[" + this.drop_UserList.SelectedItem.Text + "]--" + this.drop_Status.SelectedItem.Text + "的任务列表";
            this.drop_Status.SelectedValue = Status;

            DataSet      ds   = misBll.GetMissionDataSet(UserId, Status, beginSearchDate, endSearchDate, PageSize, currentPage, "1", false, "", TypeMission);
            HtmlTableRow hrow = null;
            if (ds != null)
            {
                int uCount = ds.Tables[0].Rows.Count;
                if (uCount > 0)
                {
                    if (Session["userid"] != null)
                    {
                        if (Session["userid"].ToString() == UserId && Status == "0")
                        {
                            //如果是用户本人并且显示待执行的任务时

                            hrow = new HtmlTableRow();
                            //HtmlTableCell cel19 = GetHCell("人员", true);
                            //cel19.Width = "50";
                            //hrow.Cells.Add(cel19);

                            HtmlTableCell cell6 = GetHCell("待执行的任务内容", true);
                            cell6.Width = "610";

                            hrow.Cells.Add(cell6);

                            HtmlTableCell cell10 = GetHCell("<div  title='任务类型'>类型</div>", true);
                            cell10.Width = "50";
                            hrow.Cells.Add(cell10);

                            HtmlTableCell cel7 = GetHCell("<div  title='任务入库日期'>入库</div>", true);
                            cel7.Width = "40";
                            hrow.Cells.Add(cel7);
                            HtmlTableCell cel17 = GetHCell("<div  title='计划完成任务所需工时'>工时</div>", true);
                            cel17.Width = "40";
                            hrow.Cells.Add(cel17);

                            HtmlTableCell cel60 = GetHCell("操作", true);
                            cel60.Width = "80";
                            hrow.Cells.Add(cel60);

                            tbl_list.Rows.Add(hrow);


                            for (int i = 0; i < uCount; i++)
                            {
                                DataTable dt = ds.Tables[0];
                                hrow = new HtmlTableRow();
                                //string _personName = dt.Rows[i]["realName"].ToString();
                                string tempBH             = (1 + i).ToString();
                                string tempMissAttachment = string.Empty;
                                if (!string.IsNullOrEmpty(dt.Rows[i]["FilePath"].ToString()))
                                {
                                    tempMissAttachment = "<span style='padding-left:10px;'><a href='" + dt.Rows[i]["FilePath"].ToString() + "' target='_blank'><img src='/inc/images/download.jpg' border='0'/></a></span>";
                                }


                                string _content = "<div style='text-align:left;'><span id='div_mission_" + tempBH + "'>" + commonFun.replaceStr(dt.Rows[i]["MissionDesc"].ToString()) + tempMissAttachment + "</span>&nbsp;<span style='color:red;cursor:pointer;' onclick=\"setTxt('div_mission_" + tempBH + "')\">[复制]</span></div>";
                                //string _content = "<div style='text-align:left;'>" + dt.Rows[i]["MissionDesc"].ToString().Trim() + "</div>";
                                string _missionType = dt.Rows[i]["MissionType"].ToString().Trim();
                                string _workHour    = dt.Rows[i]["WorkHour"].ToString().Trim();
                                string _writedate   = dt.Rows[i]["WriteDate"].ToString().Trim();


                                string _operation = "<input  class=\"btn\" type=\"button\" value=\"开始执行\" onclick=\"doSomething('first','" + ds.Tables[0].Rows[i]["UserId"].ToString() + "','" + ds.Tables[0].Rows[i]["MissionId"].ToString() + "');\" />";



                                if (!string.IsNullOrEmpty(_writedate))
                                {
                                    _writedate = Convert.ToDateTime(_writedate).ToString("M-dd H:mm");
                                }

                                if (_missionType == "0")
                                {
                                    _missionType = "维护";
                                }
                                else if (_missionType == "1")
                                {
                                    _missionType = "开发";
                                }
                                else if (_missionType == "2")
                                {
                                    _missionType = "需求分析";
                                }
                                else if (_missionType == "3")
                                {
                                    _missionType = "系统设计";
                                }
                                string _personName = dt.Rows[i]["realName"].ToString();
                                hrow.Cells.Add(GetHCell(_content, false));     // 任务内容
                                hrow.Cells.Add(GetHCell(_missionType, false)); //任务类型
                                hrow.Cells.Add(GetHCell(_writedate, false));   //入库日期
                                hrow.Cells.Add(GetHCell(_workHour, false));    //计划工时

                                hrow.Cells.Add(GetHCell(_operation, false));   //操作


                                tbl_list.Rows.Add(hrow);
                            }
                        }
                        else
                        {
                            //所有人情况


                            hrow = new HtmlTableRow();
                            HtmlTableCell cel19 = GetHCell("人员", true);
                            cel19.Width = "50";
                            hrow.Cells.Add(cel19);

                            HtmlTableCell cell6 = GetHCell("正在执行的任务内容", true);
                            cell6.Width = "360";

                            hrow.Cells.Add(cell6);

                            HtmlTableCell cell10 = GetHCell("<div  title='任务类型'>类型</div>", true);
                            cell10.Width = "50";
                            hrow.Cells.Add(cell10);

                            HtmlTableCell cel7 = GetHCell("<div  title='任务入库日期'>入库</div>", true);
                            cel7.Width = "40";
                            hrow.Cells.Add(cel7);
                            HtmlTableCell cel17 = GetHCell("<div  title='计划完成任务所需工时'>工时</div>", true);
                            cel17.Width = "40";
                            hrow.Cells.Add(cel17);
                            HtmlTableCell cel2 = GetHCell("<div  title='任务开始执行的时间'>执行</div>", true);
                            cel2.Width = "40";
                            hrow.Cells.Add(cel2);

                            HtmlTableCell cel27 = GetHCell("<div  title='实际完成的任务进度'>实际</div>", true);
                            cel27.Width = "50";
                            hrow.Cells.Add(cel27);
                            HtmlTableCell cel3 = GetHCell("<div  title='计划完成的任务进度'>计划</div>", true);
                            cel3.Width = "50";
                            hrow.Cells.Add(cel3);
                            HtmlTableCell cel4 = GetHCell("<div  title='计划完成任务的时间'>计划</div>", true);
                            cel4.Width = "40";
                            hrow.Cells.Add(cel4);
                            HtmlTableCell cel8 = GetHCell("<div  title='实际完成任务的时间'>实际</div>", true);
                            cel3.Width = "40";
                            hrow.Cells.Add(cel8);

                            //HtmlTableCell cel6 = GetHCell("<div  title='任务目前状态'>状态</div>", true);
                            //cel6.Width = "40";
                            //hrow.Cells.Add(cel6);
                            //HtmlTableCell cel60 = GetHCell("操作", true);
                            //cel60.Width = "40";
                            //hrow.Cells.Add(cel60);

                            tbl_list.Rows.Add(hrow);


                            for (int i = 0; i < uCount; i++)
                            {
                                DataTable dt = ds.Tables[0];



                                hrow = new HtmlTableRow();
                                string _personName = dt.Rows[i]["realName"].ToString();

                                string tempBH             = (1 + i).ToString();
                                string tempMissAttachment = string.Empty;
                                if (!string.IsNullOrEmpty(dt.Rows[i]["FilePath"].ToString()))
                                {
                                    tempMissAttachment = "<span style='padding-left:10px;'><a href='" + dt.Rows[i]["FilePath"].ToString() + "' target='_blank'><img src='/inc/images/download.jpg' border='0'/></a></span>";
                                }


                                string _content = "<div style='text-align:left;'><span id='div_mission_" + tempBH + "'>" + commonFun.replaceStr(dt.Rows[i]["MissionDesc"].ToString()) + tempMissAttachment + "</span>&nbsp;<span style='color:red;cursor:pointer;' onclick=\"setTxt('div_mission_" + tempBH + "')\">[复制]</span></div>";
                                //string _content = "<div style='text-align:left;'>" + dt.Rows[i]["MissionDesc"].ToString().Trim() + "</div>";
                                string _missionType = dt.Rows[i]["MissionType"].ToString().Trim();
                                string _workHour    = dt.Rows[i]["WorkHour"].ToString().Trim();
                                string _writedate   = dt.Rows[i]["WriteDate"].ToString().Trim();

                                string _execDate          = dt.Rows[i]["ExecDate"].ToString().Trim();
                                string _realProcess       = dt.Rows[i]["RealProcess"].ToString().Trim();
                                string _planFinishProcess = dt.Rows[i]["PlanFinishProcess"].ToString().Trim();
                                string _planFinishDate    = dt.Rows[i]["PlanFinishDate"].ToString().Trim();
                                string _finishDate        = dt.Rows[i]["FinisthDate"].ToString();
                                //string _Status = dt.Rows[i]["ExecStatus"].ToString().Trim();

                                // string _realProcess = "30%";
                                //string _planFinishProcess = "50%";

                                //string _operation = "<input class=\"btn\" type=\"button\" value=\"完成\" onclick=\"doSomething('second','" + ds.Tables[0].Rows[i]["UserId"].ToString() + "','" + ds.Tables[0].Rows[i]["MissionId"].ToString() + "');\" />";


                                if (_realProcess != string.Empty && _realProcess != "0")
                                {
                                    _realProcess = " <div id='div_real1' style='width:50px; height:20px; left: 0px; top: 0px; position:relative; background-color:#EEEEEE;   border-color:#1E6BB2;  border-width:1px; border-style:solid;'> <div id='div_real2' style='width:" + _realProcess + "; height:100%;background:#4AAF4F;color:#0D00EF;text-align:center;  line-height:20px; position:absolute; z-index:-1;left:0px; '></div><div style='position:relative;font-weight:bold; z-index:2; text-align:center;padding-top:3px;'>" + _realProcess + "</div> </div>";
                                }
                                else
                                {
                                    _realProcess = string.Empty;
                                }

                                if (_planFinishProcess != string.Empty && _planFinishProcess != "0")
                                {
                                    _planFinishProcess = " <div id='div_plan1' style='width:50px; height:20px; left: 0px; top: 0px; position:relative; background-color:#EEEEEE;   border-color:#1E6BB2;  border-width:1px; border-style:solid;'><div id='div_plan2' style='width:" + _planFinishProcess + "; height:100%;background:#FF6600;color:#0D00EF;text-align:center; line-height:20px; position:absolute;left:0px; z-index:-1;'></div> <div style='position:relative; font-weight:bold; z-index:2; text-align:center;padding-top:3px;'>" + _planFinishProcess + "</div></div>";
                                }
                                else
                                {
                                    _planFinishProcess = string.Empty;
                                }

                                if (!string.IsNullOrEmpty(_execDate))
                                {
                                    _execDate = Convert.ToDateTime(_execDate).ToString("M-dd H:mm");
                                }
                                if (!string.IsNullOrEmpty(_finishDate))
                                {
                                    _finishDate = Convert.ToDateTime(_finishDate).ToString("M-dd H:mm");
                                }
                                if (!string.IsNullOrEmpty(_writedate))
                                {
                                    _writedate = Convert.ToDateTime(_writedate).ToString("M-dd H:mm");
                                }
                                if (!string.IsNullOrEmpty(_planFinishDate))
                                {
                                    _planFinishDate = Convert.ToDateTime(_planFinishDate).ToString("M-dd H:mm");
                                }
                                if (_missionType == "0")
                                {
                                    _missionType = "维护";
                                }
                                else if (_missionType == "1")
                                {
                                    _missionType = "开发";
                                }
                                else if (_missionType == "2")
                                {
                                    _missionType = "需求分析";
                                }
                                else if (_missionType == "3")
                                {
                                    _missionType = "系统设计";
                                }

                                //if (_Status == "0")
                                //{
                                //    _Status = "待执行";
                                //}
                                //else if (_Status == "1")
                                //{
                                //    _Status = "执行中";
                                //}
                                //else if (_Status == "2")
                                //{
                                //    _Status = "已完成";
                                //}
                                hrow.Cells.Add(GetHCell(_personName, false));        //人员姓名
                                hrow.Cells.Add(GetHCell(_content, false));           // 任务内容
                                hrow.Cells.Add(GetHCell(_missionType, false));       //任务类型
                                hrow.Cells.Add(GetHCell(_writedate, false));         //入库日期
                                hrow.Cells.Add(GetHCell(_workHour, false));          //计划工时
                                hrow.Cells.Add(GetHCell(_execDate, false));          //执行日期
                                hrow.Cells.Add(GetHCell(_realProcess, false));       //实际进度
                                hrow.Cells.Add(GetHCell(_planFinishProcess, false)); //计划工作进度

                                hrow.Cells.Add(GetHCell(_planFinishDate, false));    //计划结束时间
                                hrow.Cells.Add(GetHCell(_finishDate, false));        //实际结束时间
                                //hrow.Cells.Add(GetHCell(_Status, false));  //执行状态
                                //hrow.Cells.Add(GetHCell(_operation, false));//操作


                                tbl_list.Rows.Add(hrow);
                            }
                        }
                    }
                    else
                    {
                        Response.Redirect("/login.aspx");
                    }
                }
                else
                {
                    hrow = new HtmlTableRow();
                    string        tempNo = "温馨提示:没有任务信息!";
                    HtmlTableCell cell   = GetHCell(tempNo, false);
                    cell.Height = "35px;";
                    hrow.Cells.Add(cell);
                    tbl_list.Rows.Add(hrow);
                }
            }
            else
            {
            }

            string parms = "&bd=" + beginSearchDate + "&ed=" + endSearchDate + "&uid=" + UserId + "&st=" + Status + "&to=" + TypeMission;
            GetPage(userCount, PageSize, currentPage, parms);//获取分页文字
        }
Beispiel #10
0
        /// <summary>
        /// 获取当前执行的任务
        /// </summary>
        public void GetExecingMission()
        {
            NetUserMission bll   = new NetUserMission();
            DataSet        objDs = bll.GetDataSetByStatus(UserId, beginSearchDate, endSearchDate);
            HtmlTable      ht    = new HtmlTable();
            HtmlTableRow   hrow  = null;

            if (objDs != null)
            {
                int dsCount = objDs.Tables[0].Rows.Count;
                this.hid_missionCount.Value = dsCount.ToString();
                if (dsCount > 0)
                {
                    Session["MissionId"] = objDs.Tables[0].Rows[0]["MissionId"].ToString();

                    //原来的代码
                    //sp_bpCount.InnerHtml = "(" + dsCount + ")";
                    //string tempString = string.Empty;
                    //string tempStr = string.Empty;

                    //for (int i = 0; i < dsCount; i++)
                    //{

                    //    string time = objDs.Tables[0].Rows[i]["writedate"].ToString();
                    //    string tempMissStr = string.Empty;
                    //    Session["MissionId"] = objDs.Tables[0].Rows[0]["MissionId"].ToString();
                    //    if (objDs.Tables[0].Rows[i]["MissionType"].ToString() == "0")
                    //    {
                    //        tempMissStr = "<span style='padding-left:20px;'>任务类型:维护</span>";
                    //    }
                    //    else
                    //    {
                    //        tempMissStr = "<span style='padding-left:20px;'>任务类型:开发</span>";
                    //    }
                    //    if (Session["userid"].ToString() == UserId)
                    //    {
                    //        tempString = "<span style=\"padding-left:200px;\"><input class=\"btn\" type=\"button\" value=\"我完成了!\" onclick=\"doSomething('second','" + objDs.Tables[0].Rows[i]["UserId"].ToString() + "','" + objDs.Tables[0].Rows[i]["MissionId"].ToString() + "');\" /></span>";
                    //    }

                    //    tempStr += "<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>" + tempString + tempMissStr + "</div>";
                    //    tempStr += "<div style='text-align:left;padding-left:20px;padding-top:5px;'>" + objDs.Tables[0].Rows[i]["MissionDesc"].ToString() + "</div>";
                    //    tempStr += "<div style='padding-right: 20px; font-size: 13px; text-align: right'>状态:【执行中】执行时间:" + objDs.Tables[0].Rows[i]["ExecDate"].ToString() + "&nbsp;&nbsp;任务人:" + objDs.Tables[0].Rows[i]["realName"].ToString() + "</div>";
                    //}
                    //this.div_MissionList.InnerHtml = tempStr;



                    hrow = new HtmlTableRow();

                    HtmlTableCell cell6 = GetHCell("正在执行的任务内容", true);
                    if (Session["userid"].ToString() == UserId)
                    {
                        cell6.Width = "450";
                    }
                    else
                    {
                        cell6.Width = "490";
                    }
                    hrow.Cells.Add(cell6);

                    HtmlTableCell cell10 = GetHCell("<div  title='任务类型'>类型</div>", true);
                    cell10.Width = "50";
                    hrow.Cells.Add(cell10);

                    HtmlTableCell cel7 = GetHCell("<div  title='任务入库日期'>入库</div>", true);
                    cel7.Width = "40";
                    hrow.Cells.Add(cel7);
                    HtmlTableCell cel17 = GetHCell("<div  title='计划完成任务所需工时'>工时</div>", true);
                    cel17.Width = "40";
                    hrow.Cells.Add(cel17);
                    HtmlTableCell cel2 = GetHCell("<div  title='任务开始执行的时间'>执行</div>", true);
                    cel2.Width = "40";
                    hrow.Cells.Add(cel2);

                    HtmlTableCell cel27 = GetHCell("<div  title='实际完成的任务进度'>实际</div>", true);
                    cel27.Width = "50";
                    hrow.Cells.Add(cel27);
                    HtmlTableCell cel3 = GetHCell("<div  title='此刻计划应该完成的任务进度'>计划</div>", true);
                    cel3.Width = "50";
                    hrow.Cells.Add(cel3);
                    HtmlTableCell cel4 = GetHCell("<div  title='计划完成任务的时间'>计划</div>", true);
                    cel4.Width = "40";
                    hrow.Cells.Add(cel4);
                    //HtmlTableCell cel8 = GetHCell("实际结束", true);
                    //cel3.Width = "50";
                    //hrow.Cells.Add(cel8);

                    //HtmlTableCell cel6 = GetHCell("状态", true);
                    //cel6.Width = "40";
                    //hrow.Cells.Add(cel6);
                    if (Session["userid"].ToString() == UserId)
                    {
                        HtmlTableCell cel60 = GetHCell("操作", true);
                        cel60.Width = "40";
                        hrow.Cells.Add(cel60);
                    }
                    tbl_mission_list.Rows.Add(hrow);


                    for (int i = 0; i < dsCount; i++)
                    {
                        DataTable dt = objDs.Tables[0];

                        hrow = new HtmlTableRow();
                        string tempBH             = (1 + i).ToString();
                        string tempMissAttachment = string.Empty;
                        if (!string.IsNullOrEmpty(dt.Rows[i]["FilePath"].ToString()))
                        {
                            tempMissAttachment = "<span style='padding-left:10px;'><a href='" + dt.Rows[i]["FilePath"].ToString() + "' target='_blank'><img src='/inc/images/download.jpg' border='0'/></a></span>";
                        }


                        string _content = "<div style='text-align:left;'><span id='div_mission_" + tempBH + "'>" + commonFun.replaceStr(dt.Rows[i]["MissionDesc"].ToString()) + tempMissAttachment + "</span>&nbsp;<span style='color:red;cursor:pointer;' onclick=\"setTxt('div_mission_" + tempBH + "')\">[复制]</span></div>";
                        //string _content ="<div style='text-align:left;'>"+ dt.Rows[i]["MissionDesc"].ToString().Trim()+ "</div>";
                        string _missionType = dt.Rows[i]["MissionType"].ToString().Trim();
                        string _workHour    = dt.Rows[i]["WorkHour"].ToString().Trim();
                        string _writedate   = dt.Rows[i]["WriteDate"].ToString().Trim();

                        string _execDate          = dt.Rows[i]["ExecDate"].ToString().Trim();
                        string _realProcess       = dt.Rows[i]["RealProcess"].ToString().Trim();
                        string _planFinishProcess = dt.Rows[i]["PlanFinishProcess"].ToString().Trim();
                        string _planFinishDate    = dt.Rows[i]["PlanFinishDate"].ToString().Trim();
                        //string finishDate = dt.Rows[i]["FinisthDate"].ToString();
                        //string _Status = dt.Rows[i]["ExecStatus"].ToString().Trim();

                        // string _realProcess = "30%";
                        //string _planFinishProcess = "50%";
                        if (!string.IsNullOrEmpty(_realProcess))
                        {
                            this.hid_realProcess.Value = _realProcess.Replace("%", "");
                        }

                        string _operation = "<input class=\"btn\" type=\"button\" value=\"完成\" onclick=\"doSomething('second','" + objDs.Tables[0].Rows[i]["UserId"].ToString() + "','" + objDs.Tables[0].Rows[i]["MissionId"].ToString() + "');\" />";


                        if (_realProcess != string.Empty && _realProcess != "0")
                        {
                            _realProcess = " <div id='div_real1' style='width:50px; height:20px; left: 0px; top: 0px; position:relative; background-color:#EEEEEE;   border-color:#1E6BB2;  border-width:1px; border-style:solid;'> <div id='div_real2' style='width:" + _realProcess + "; height:100%;background:#4AAF4F;color:#0D00EF;text-align:center;  line-height:20px; position:absolute; z-index:-1;left:0px; '></div><div style='position:relative;font-weight:bold; z-index:2; text-align:center;padding-top:3px;'>" + _realProcess + "</div> </div>";
                        }
                        else
                        {
                            _realProcess = string.Empty;
                        }

                        if (_planFinishProcess != string.Empty && _planFinishProcess != "0")
                        {
                            _planFinishProcess = "<div id='div_plan1' style='width:50px; height:20px; left: 0px; top: 0px; position:relative; background-color:#EEEEEE;   border-color:#1E6BB2;  border-width:1px; border-style:solid;'><div id='div_plan2' style='width:" + _planFinishProcess + "; height:100%;background:#FF6600;color:#0D00EF;text-align:center; line-height:20px; position:absolute;left:0px; z-index:-1;'></div> <div style='position:relative; font-weight:bold; z-index:2; text-align:center;padding-top:3px;'>" + _planFinishProcess + "</div></div>";
                        }
                        else
                        {
                            _planFinishProcess = string.Empty;
                        }

                        if (!string.IsNullOrEmpty(_execDate))
                        {
                            _execDate = Convert.ToDateTime(_execDate).ToString("M-dd H:mm");
                        }
                        //if (!string.IsNullOrEmpty(finishDate))
                        //{
                        //    finishDate = Convert.ToDateTime(finishDate).ToString("M-dd H:mm");
                        //}
                        if (!string.IsNullOrEmpty(_writedate))
                        {
                            _writedate = Convert.ToDateTime(_writedate).ToString("M-dd H:mm");
                        }
                        if (!string.IsNullOrEmpty(_planFinishDate))
                        {
                            _planFinishDate = Convert.ToDateTime(_planFinishDate).ToString("M-dd H:mm");
                        }
                        if (_missionType == "0")
                        {
                            _missionType = "维护";
                        }
                        else if (_missionType == "1")
                        {
                            _missionType = "开发";
                        }
                        else if (_missionType == "2")
                        {
                            _missionType = "需求分析";
                        }
                        else if (_missionType == "3")
                        {
                            _missionType = "系统设计";
                        }

                        //if (_Status == "0")
                        //{
                        //    _Status = "待执行";
                        //}
                        //else if (_Status == "1")
                        //{
                        //    _Status = "执行中";
                        //}
                        //else if (_Status == "2")
                        //{
                        //    _Status = "已完成";
                        //}

                        hrow.Cells.Add(GetHCell(_content, false));           // 任务内容
                        hrow.Cells.Add(GetHCell(_missionType, false));       //任务类型
                        hrow.Cells.Add(GetHCell(_writedate, false));         //入库日期
                        hrow.Cells.Add(GetHCell(_workHour, false));          //计划工时
                        hrow.Cells.Add(GetHCell(_execDate, false));          //执行日期
                        hrow.Cells.Add(GetHCell(_realProcess, false));       //实际进度
                        hrow.Cells.Add(GetHCell(_planFinishProcess, false)); //计划工作进度

                        hrow.Cells.Add(GetHCell(_planFinishDate, false));    //计划结束时间
                        //hrow.Cells.Add(GetHCell(_Status, false));  //执行状态
                        if (Session["userid"].ToString() == UserId)
                        {
                            hrow.Cells.Add(GetHCell(_operation, false));        //操作
                        }
                        tbl_mission_list.Rows.Add(hrow);
                    }
                }
                else
                {
                    hrow = new HtmlTableRow();
                    HtmlTableCell hcell = GetHCell("温馨提示:该时间段没有任何任务!", false);
                    //hcell.Attributes.Add("colspan", "9");
                    hcell.Height = "35px;";
                    hrow.Cells.Add(hcell);

                    tbl_mission_list.Rows.Add(hrow);
                }
            }
            else
            {
                hrow = new HtmlTableRow();
                HtmlTableCell hcell = null;

                hcell = GetHCell("温馨提示:该时间段没有任何任务!", false);
                hcell.Attributes.Add("colspan", "10");
                hrow.Cells.Add(hcell);

                tbl_mission_list.Rows.Add(hrow);
            }
        }
Beispiel #11
0
        //修改实际任务进度
        private bool UpdateRealProcess(string pProcess, int pMissionId)
        {
            NetUserMission _net = new NetUserMission();

            return(_net.UpdateRealProcess(pMissionId, pProcess));
        }
        /// <summary>
        /// 获取数据集合
        /// </summary>
        /// <param name="IsSearch"></param>
        public void GetMissionList(bool IsSearch)
        {
            NetUserMission misBll  = new NetUserMission();
            UserMission    misInfo = new UserMission();


            #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");
                beginSearchDate      = this.beginTime.Value;
                endSearchDate        = this.endTime.Value;
            }

            if (IsSearch)
            {
                beginSearchDate = Convert.ToDateTime(this.beginTime.Value).ToString("yyyy-MM-dd");
                endSearchDate   = Convert.ToDateTime(this.endTime.Value).ToString("yyyy-MM-dd");
                Status          = this.drop_Status.SelectedValue;
                UserId          = this.drop_UserList.SelectedValue;
                if (chk_IsAsigin.Checked)
                {
                    IsAsign = "1";
                }
                else
                {
                    IsAsign = "0";
                }
                //IsAsign = this.drop_IsAssign.SelectedValue;
                KeyWord     = this.txt_content.Value.Trim();
                TypeMission = this.drop_type.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   = misBll.GetMissionFYCount(UserId, Status, beginSearchDate, endSearchDate, IsAsign, true, KeyWord, TypeMission);//获取分页总数
            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

            if (IsAsign == "1")
            {
                tempTitle = "[" + this.drop_UserList.SelectedItem.Text + "]--已经分配的任务列表";
            }
            else
            {
                tempTitle = "[" + this.drop_UserList.SelectedItem.Text + "]--未分配的任务列表";
            }
            this.drop_Status.SelectedValue = Status;
            DataSet ds = misBll.GetMissionDataSet(UserId, Status, beginSearchDate, endSearchDate, PageSize, currentPage, IsAsign, true, KeyWord, TypeMission);

            #region 重新构造数据显示格式
            if (ds == null || ds.Tables.Count == 0)
            {
                //this.Page_Load(null, null);
                HtmlTableRow  hrow  = new HtmlTableRow();
                HtmlTableCell hcell = GetHCell("温馨提示:该时间段没有任务!", false);
                //hcell.Attributes.Add("colspan", "12");

                hrow.Cells.Add(hcell);
                this.tbl_list.Rows.Add(hrow);
            }
            else
            {
                DataTableHelper dHelp = new DataTableHelper();
                DataRow[]       dv    = dHelp.SelectDistinct("result", ds.Tables[0], "userid").Select("1=1");
                if (dv.Length > 0)
                {
                    //创建表头
                    HtmlTableRow hrow = null;
                    hrow = new HtmlTableRow();

                    HtmlTableCell cel19 = GetHCell("人员", true);
                    cel19.Width = "50";
                    hrow.Cells.Add(cel19);

                    //if (Status == "0" || Status == "-1")
                    //{
                    HtmlTableCell cel5 = GetHCell("操作", true);
                    cel5.Width = "40";
                    hrow.Cells.Add(cel5);
                    //}

                    HtmlTableCell cell6 = GetHCell("任务内容", true);
                    //if (Status == "0" || Status == "-1")
                    //{
                    //    cell6.Width = "400";
                    //}
                    //else
                    //{
                    cell6.Width = "690";
                    //}
                    hrow.Cells.Add(cell6);

                    HtmlTableCell cell10 = GetHCell("类型", true);
                    cell10.Width = "70";
                    hrow.Cells.Add(cell10);

                    HtmlTableCell cel7 = GetHCell("<div  title='入库日期'>入库</div>", true);
                    cel7.Width = "40";
                    hrow.Cells.Add(cel7);
                    HtmlTableCell cel17 = GetHCell("<div  title='计划完成任务所需工时'>工时</div>", true);
                    cel17.Width = "40";
                    hrow.Cells.Add(cel17);
                    HtmlTableCell cel2 = GetHCell("<div  title='任务开始执行的时间'>执行</div>", true);
                    cel2.Width = "40";
                    hrow.Cells.Add(cel2);

                    HtmlTableCell cel27 = GetHCell("<div  title='实际完成的任务进度'>实际</div>", true);
                    cel27.Width = "50";
                    hrow.Cells.Add(cel27);
                    HtmlTableCell cel3 = GetHCell("<div  title='此刻计划应该完成的任务进度'>计划</div>", true);
                    cel3.Width = "50";
                    hrow.Cells.Add(cel3);
                    HtmlTableCell cel4 = GetHCell("<div  title='计划完成任务的时间'>计划</div>", true);
                    cel4.Width = "40";
                    hrow.Cells.Add(cel4);
                    HtmlTableCell cel8 = GetHCell("<div  title='实际完成任务的时间'>实际</div>", true);
                    cel8.Width = "40";
                    hrow.Cells.Add(cel8);

                    HtmlTableCell cel60 = GetHCell("状态", true);
                    cel60.Width = "30";
                    hrow.Cells.Add(cel60);

                    tbl_list.Rows.Add(hrow);


                    foreach (DataRow dr in dv)
                    {
                        DataTable dt      = dHelp.GetNewDataTable(ds.Tables[0], "userid=" + dr[0].ToString());
                        int       dtCount = dt.Rows.Count;
                        if (dtCount > 0)
                        {
                            int uCount = dt.Rows.Count;
                            if (uCount > 0)
                            {
                                for (int i = 0; i < uCount; i++)
                                {
                                    string tempBH        = (currentPage - 1) * PageSize + i + 1 + dr[0].ToString();
                                    string tempStatus    = string.Empty;//是否执行
                                    string tempStatusStr = string.Empty;
                                    hrow = new HtmlTableRow();
                                    //string realname = dt.Rows[i]["realName"].ToString();
                                    //if (string.IsNullOrEmpty(realname))
                                    //{
                                    //realname = "<font color=red>未分配</font>";
                                    //}
                                    //hrow.Cells.Add(GetHCell("" + realname + "", false));
                                    string personName = dt.Rows[i]["realName"].ToString();
                                    hrow.Cells.Add(GetHCell(personName, false));
                                    tempStatus = dt.Rows[i]["ExecStatus"].ToString();

                                    if (tempStatus == "0")
                                    {
                                        //if (IsAsign == "0")
                                        //{
                                        //    hrow.Cells.Add(GetHCell("<div><img onclick=\"deldata('" + dt.Rows[i]["MissionId"].ToString() + "','" + dt.Rows[i]["UserId"].ToString() + "')\" style='cursor:pointer;' alt='删除当前任务' src='../inc/images/album_del.gif' border='0'>&nbsp;<img alt='分配当前任务' style='cursor:pointer;' onclick=\"showDiv('" + dt.Rows[i]["MissionId"].ToString() + "')\" src='../inc/images/a_edit.gif' border='0'><img alt='修改当前任务' style='cursor:pointer;' onclick=\"showMission('" + dt.Rows[i]["MissionId"].ToString() + "','" + tempBH + "')\" src='../inc/images/iedit1.gif' border='0'></div>", false));
                                        //}
                                        //else
                                        //{
                                        hrow.Cells.Add(GetHCell("<div><img onclick=\"deldata('" + dt.Rows[i]["MissionId"].ToString() + "','" + dt.Rows[i]["UserId"].ToString() + "','" + dt.Rows[i]["FilePath"].ToString() + "')\" style='cursor:pointer;' alt='删除当前任务' src='../inc/images/album_del.gif' border='0'>&nbsp;<img alt='分配当前任务' style='cursor:pointer;' onclick=\"showDiv('" + dt.Rows[i]["MissionId"].ToString() + "')\" src='../inc/images/a_edit.gif' border='0'>&nbsp;<img alt='修改当前任务' style='cursor:pointer;' onclick=\"showMission('" + dt.Rows[i]["MissionId"].ToString() + "','" + tempBH + "')\" src='../inc/images/iedit1.gif' border='0'></div>", false));
                                        //}
                                    }
                                    else
                                    {
                                        //if (Status == "-1")
                                        //{
                                        if (tempStatus == "1")
                                        {
                                            hrow.Cells.Add(GetHCell("<div><img alt='变更当前任务人' style='cursor:pointer;' onclick=\"showDiv('" + dt.Rows[i]["MissionId"].ToString() + "')\" src='../inc/images/a_edit.gif' border='0'>&nbsp;<img alt='修改当前任务' style='cursor:pointer;' onclick=\"showMission('" + dt.Rows[i]["MissionId"].ToString() + "','" + tempBH + "')\" src='../inc/images/iedit1.gif' border='0'></div>", false));
                                        }
                                        else
                                        {
                                            hrow.Cells.Add(GetHCell("<div>无</div>", false));
                                        }
                                    }

                                    string tempMissAttachment = string.Empty;
                                    if (!string.IsNullOrEmpty(ds.Tables[0].Rows[i]["FilePath"].ToString()))
                                    {
                                        tempMissAttachment = "<span style='padding-left:10px;'><a href='" + dt.Rows[i]["FilePath"].ToString() + "' target='_blank'><img src='/inc/images/download.jpg' border='0'/></a></span>";
                                    }


                                    hrow.Cells.Add(GetHCell("<div style='text-align:left;'><span id='div_mission_" + tempBH + "'>" + commonFun.replaceStr(dt.Rows[i]["MissionDesc"].ToString()) + tempMissAttachment + "</span>&nbsp;<span style='color:red;cursor:pointer;' onclick=\"setTxt('div_mission_" + tempBH + "')\">[复制]</span></div>", false)); //描述

                                    if (tempStatus == "0")
                                    {
                                        tempStatusStr = "<img alt='待执行' src='../inc/images/red.gif' border='0'>";
                                    }
                                    else if (tempStatus == "1")
                                    {
                                        tempStatusStr = "<img alt='执行中' src='../inc/images/yellow.gif' border='0'>";
                                    }
                                    else if (tempStatus == "2")
                                    {
                                        tempStatusStr = "<img alt='已经完成' src='../inc/images/green.gif' border='0'>";
                                    }
                                    string writedate = dt.Rows[i]["WriteDate"].ToString();

                                    string execDate       = dt.Rows[i]["ExecDate"].ToString();
                                    string finishDate     = dt.Rows[i]["FinisthDate"].ToString();
                                    string planFinishDate = dt.Rows[i]["PlanFinishDate"].ToString();
                                    string _workHour      = dt.Rows[i]["WorkHour"].ToString();
                                    // int _realProcess = 0;
                                    // int _planFinishProcess = 0;
                                    // if (dt.Rows[i]["RealProcess"].ToString().Trim() != string.Empty)
                                    // {
                                    //     _realProcess =Convert.ToInt32( dt.Rows[i]["RealProcess"]);
                                    // }

                                    //if (dt.Rows[i]["PlanFinishProcess"].ToString().Trim()!=string.Empty)
                                    //{
                                    //    _planFinishProcess = Convert.ToInt32(dt.Rows[i]["PlanFinishProcess"]);
                                    //}

                                    string _realProcess = dt.Rows[i]["RealProcess"].ToString().Trim();

                                    string _planFinishProcess = dt.Rows[i]["PlanFinishProcess"].ToString().Trim();
                                    // string _realProcess = "30%";
                                    //string _planFinishProcess = "50%";
                                    if (_realProcess != string.Empty && _realProcess != "0")
                                    {
                                        _realProcess = " <div id='div_real1' style='width:50px; height:20px; left: 0px; top: 0px; position:relative; background-color:#EEEEEE;   border-color:#1E6BB2;  border-width:1px; border-style:solid;'> <div id='div_real2' style='width:" + _realProcess + "; height:100%;background:#4AAF4F;color:#0D00EF;text-align:center;  line-height:20px; position:absolute; z-index:-1;left:0px; '></div><div style='position:relative;font-weight:bold; z-index:2; text-align:center;padding-top:3px;'>" + _realProcess + "</div> </div>";
                                    }
                                    else
                                    {
                                        _realProcess = string.Empty;
                                    }

                                    if (_planFinishProcess != string.Empty && _planFinishProcess != "0")
                                    {
                                        _planFinishProcess = " <div id='div_plan1' style='width:50px; height:20px; left: 0px; top: 0px; position:relative; background-color:#EEEEEE;   border-color:#1E6BB2;  border-width:1px; border-style:solid;'><div id='div_plan2' style='width:" + _planFinishProcess + "; height:100%;background:#FF6600;color:#0D00EF;text-align:center; line-height:20px; position:absolute;left:0px; z-index:-1;'></div> <div style='position:relative; font-weight:bold; z-index:2; text-align:center;padding-top:3px;'>" + _planFinishProcess + "</div></div>";
                                    }
                                    else
                                    {
                                        _planFinishProcess = string.Empty;
                                    }

                                    if (!string.IsNullOrEmpty(execDate))
                                    {
                                        execDate = Convert.ToDateTime(execDate).ToString("M-dd H:mm");
                                    }
                                    if (!string.IsNullOrEmpty(finishDate))
                                    {
                                        finishDate = Convert.ToDateTime(finishDate).ToString("M-dd H:mm");
                                    }
                                    if (!string.IsNullOrEmpty(writedate))
                                    {
                                        writedate = Convert.ToDateTime(writedate).ToString("M-dd H:mm");
                                    }
                                    if (!string.IsNullOrEmpty(planFinishDate))
                                    {
                                        planFinishDate = Convert.ToDateTime(planFinishDate).ToString("M-dd H:mm");
                                    }
                                    string _missionType = string.Empty;
                                    if (dt.Rows[i]["MissionType"].ToString() == "0")
                                    {
                                        _missionType = "维护";
                                    }
                                    else if (dt.Rows[i]["MissionType"].ToString() == "1")
                                    {
                                        _missionType = "开发";
                                    }
                                    else if (dt.Rows[i]["MissionType"].ToString() == "2")
                                    {
                                        _missionType = "需求分析";
                                    }
                                    else if (dt.Rows[i]["MissionType"].ToString() == "3")
                                    {
                                        _missionType = "系统设计";
                                    }


                                    //显示数据
                                    hrow.Cells.Add(GetHCell(_missionType, false));       //任务类型
                                    hrow.Cells.Add(GetHCell(writedate, false));          //入库日期
                                    hrow.Cells.Add(GetHCell(_workHour, false));          //计划工时
                                    hrow.Cells.Add(GetHCell(execDate, false));           //执行日期
                                    hrow.Cells.Add(GetHCell(_realProcess, false));       //实际进度
                                    hrow.Cells.Add(GetHCell(_planFinishProcess, false)); //计划工作进度

                                    hrow.Cells.Add(GetHCell(planFinishDate, false));     //计划结束时间
                                    hrow.Cells.Add(GetHCell(finishDate, false));         //结束日期

                                    hrow.Cells.Add(GetHCell(tempStatusStr, false));      //执行状态


                                    tbl_list.Rows.Add(hrow);
                                }
                            }
                            else
                            {
                                hrow = new HtmlTableRow();
                                HtmlTableCell hcell = GetHCell("温馨提示:该时间段没有任何任务!", false);
                                hcell.Attributes.Add("colspan", "12");
                                hrow.Cells.Add(hcell);

                                tbl_list.Rows.Add(hrow);
                            }
                        }
                        else
                        {
                            hrow = new HtmlTableRow();
                            HtmlTableCell hcell = GetHCell("温馨提示:该时间段没有任何任务!", false);
                            hcell.Attributes.Add("colspan", "12");
                            hrow.Cells.Add(hcell);

                            tbl_list.Rows.Add(hrow);
                        }
                    }
                }
                else
                {
                    HtmlTableRow  hrow  = new HtmlTableRow();
                    HtmlTableCell hcell = GetHCell("温馨提示:该时间段没有任何任务!", false);
                    //hcell.Attributes.Add("colspan", "12");
                    hrow.Cells.Add(hcell);

                    tbl_list.Rows.Add(hrow);
                }
            }
            #endregion

            #region 数据显示方式 原来的

            //HtmlTableRow hrow = null;
            //if (ds != null)
            //{

            //    hrow = new HtmlTableRow();

            //    HtmlTableCell cel1 = GetHCell("任务人", true);
            //    cel1.Width = "60";
            //    hrow.Cells.Add(cel1);

            //    HtmlTableCell cell6 = GetHCell("任务内容", true);
            //    if (Status == "0" || Status == "-1")
            //    {
            //        cell6.Width = "560";
            //    }
            //    else
            //    {
            //        cell6.Width = "600";
            //    }
            //    hrow.Cells.Add(cell6);

            //    HtmlTableCell cel7 = GetHCell("入库日期", true);
            //    cel7.Width = "70";
            //    hrow.Cells.Add(cel7);

            //    HtmlTableCell cel2 = GetHCell("执行时间", true);
            //    cel2.Width = "70";
            //    hrow.Cells.Add(cel2);

            //    HtmlTableCell cel3 = GetHCell("结束日期", true);
            //    cel3.Width = "70";
            //    hrow.Cells.Add(cel3);



            //    HtmlTableCell cel4 = GetHCell("状态", true);
            //    cel4.Width = "40";
            //    hrow.Cells.Add(cel4);

            //    if (Status == "0" || Status == "-1")
            //    {
            //        HtmlTableCell cel5 = GetHCell("操作", true);
            //        cel5.Width = "30";
            //        hrow.Cells.Add(cel5);
            //    }

            //    tbl_list.Rows.Add(hrow);

            //    int uCount = ds.Tables[0].Rows.Count;
            //    if (uCount > 0)
            //    {
            //        for (int i = 0; i < uCount; i++)
            //        {

            //            string tempStatus = string.Empty;//是否执行
            //            string tempStatusStr = string.Empty;
            //            hrow = new HtmlTableRow();
            //            string realname = ds.Tables[0].Rows[i]["realName"].ToString();
            //            if (string.IsNullOrEmpty(realname))
            //            {
            //                realname = "<font color=red>未分配</font>";
            //            }
            //            hrow.Cells.Add(GetHCell("" + realname + "", false));
            //            hrow.Cells.Add(GetHCell("<div style='text-align:left;'>" + commonFun.replaceStr(ds.Tables[0].Rows[i]["MissionDesc"].ToString()) + "</div>", false)); //描述
            //            tempStatus = ds.Tables[0].Rows[i]["ExecStatus"].ToString();
            //            if (tempStatus == "0")
            //            {
            //                tempStatusStr = "<img alt='待执行' src='../inc/images/red.gif' border='0'>";
            //            }
            //            else if (tempStatus == "1")
            //            {
            //                tempStatusStr = "<img alt='执行中' src='../inc/images/yellow.gif' border='0'>";
            //            }
            //            else if (tempStatus == "2")
            //            {
            //                tempStatusStr = "<img alt='已经完成' src='../inc/images/green.gif' border='0'>";
            //            }
            //            string writedate = ds.Tables[0].Rows[i]["WriteDate"].ToString();
            //            string execDate=ds.Tables[0].Rows[i]["ExecDate"].ToString();
            //            string finishDate=ds.Tables[0].Rows[i]["FinisthDate"].ToString();

            //            if(!string.IsNullOrEmpty(execDate))
            //            {
            //                execDate=Convert.ToDateTime(execDate).ToString("MM-dd hh:mm");
            //            }
            //            if(!string.IsNullOrEmpty(finishDate))
            //            {
            //                finishDate=Convert.ToDateTime(finishDate).ToString("MM-dd hh:mm");
            //            }
            //            if(!string.IsNullOrEmpty(writedate))
            //            {
            //                writedate=Convert.ToDateTime(writedate).ToString("MM-dd hh:mm");
            //            }
            //            hrow.Cells.Add(GetHCell(writedate, false)); //入库日期
            //            hrow.Cells.Add(GetHCell(execDate, false)); //执行日期
            //            hrow.Cells.Add(GetHCell(finishDate, false)); //结束日期

            //            hrow.Cells.Add(GetHCell(tempStatusStr, false)); //执行状态
            //            if (tempStatus == "0")
            //            {
            //                if (IsAsign == "0")
            //                {
            //                    hrow.Cells.Add(GetHCell("<div><img onclick=\"deldata('" + ds.Tables[0].Rows[i]["MissionId"].ToString() + "','" + ds.Tables[0].Rows[i]["UserId"].ToString() + "')\" style='cursor:pointer;' alt='删除当前任务' src='../inc/images/album_del.gif' border='0'>&nbsp;<img alt='分配当前任务' onclick=\"showDiv('"+ds.Tables[0].Rows[i]["MissionId"].ToString()+"')\" src='../inc/images/a_edit.gif' border='0'></div>", false));
            //                }
            //                else
            //                {
            //                    hrow.Cells.Add(GetHCell("<div><img onclick=\"deldata('" + ds.Tables[0].Rows[i]["MissionId"].ToString() + "','" + ds.Tables[0].Rows[i]["UserId"].ToString() + "')\" style='cursor:pointer;' alt='删除当前任务' src='../inc/images/album_del.gif' border='0'>&nbsp;<img alt='修改当前任务' src='../inc/images/a_edit.gif' border='0'></div>", false));
            //                }
            //            }
            //            else
            //            {
            //                if (Status == "-1")
            //                {
            //                    hrow.Cells.Add(GetHCell("<div>无</div>", false));
            //                }
            //            }

            //            tbl_list.Rows.Add(hrow);
            //        }
            //    }
            //    else
            //    {
            //        hrow = new HtmlTableRow();
            //        HtmlTableCell hcell = null;
            //        if (Status == "0" || Status == "-1")
            //        {
            //            hcell = GetHCell("温馨提示:该时间段没有任何任务!", false);
            //            hcell.Attributes.Add("colspan", "7");
            //            hrow.Cells.Add(hcell);
            //        }
            //        else
            //        {
            //            hcell = GetHCell("温馨提示:该时间段没有任何任务!", false);
            //            hcell.Attributes.Add("colspan", "6");
            //            hrow.Cells.Add(hcell);
            //        }
            //        tbl_list.Rows.Add(hrow);
            //    }
            //}
            //else
            //{
            //    hrow = new HtmlTableRow();
            //    HtmlTableCell hcell = null;
            //    if (Status == "0" || Status == "-1")
            //    {
            //        hcell = GetHCell("温馨提示:该时间段没有任何任务!", false);
            //        hcell.Attributes.Add("colspan", "7");
            //        hrow.Cells.Add(hcell);
            //    }
            //    else
            //    {
            //        hcell = GetHCell("温馨提示:该时间段没有任何任务!", false);
            //        hcell.Attributes.Add("colspan", "6");
            //        hrow.Cells.Add(hcell);
            //    }
            //    tbl_list.Rows.Add(hrow);
            //}

            #endregion

            string parms = "&isa=" + IsAsign + "&opt=off&bd=" + beginSearchDate + "&ed=" + endSearchDate + "&uid=" + UserId + "&st=" + Status + "&tl=" + Server.UrlEncode(KeyWord) + "&to=" + TypeMission;
            GetPage(userCount, PageSize, currentPage, parms);//获取分页文字
        }