Example #1
0
    /// <summary>
    /// 绑定信息列表
    /// </summary>
    public void ListInfoBind()
    {
        if (!string.IsNullOrEmpty(Request.QueryString["page"]))//分页
        {
            pageIndex = int.Parse(Request.QueryString["page"]);
        }
        //string sstxt = this.scbar_txt.Value;//搜索
        string type    = Request.QueryString["type_pb"];
        string typecid = Request.QueryString["typecid"];
        string fk      = Request.QueryString["fk"];
        string ss      = Request.QueryString["ss"];
        string px      = Request.QueryString["px"];
        string st      = Request.QueryString["st"];
        string orderBy = string.Empty;

        if (!string.IsNullOrEmpty(st))
        {
            switch (st)
            {
            case "0":
                break;

            case "1":
                To_Posts.ReleaseTime = DateTime.Now.AddDays(-1);
                break;

            case "2":
                To_Posts.ReleaseTime = DateTime.Now.AddDays(-2);
                break;

            case "7":
                To_Posts.ReleaseTime = DateTime.Now.AddDays(-7);
                break;

            case "30":
                To_Posts.ReleaseTime = DateTime.Now.AddMonths(-1);
                break;

            case "60":
                To_Posts.ReleaseTime = DateTime.Now.AddMonths(-2);
                break;
            }
        }
        if (!string.IsNullOrEmpty(px))
        {
            switch (px)
            {
            case "1":    //发帖时间
                orderBy = "p.ReleaseTime desc";
                break;

            case "2":    //回复数
                orderBy = " p.ReCount desc";
                break;

            case "3":
                orderBy = " p.LookCount desc";
                break;

            case "4":    //最后发表时间
                orderBy = " p.LastTime desc";
                break;

            case "5":
                orderBy = " p.LookCount desc";
                break;
            }
        }
        if (!string.IsNullOrEmpty(type)) //热点问题
        {
            if (type == "hot")           //热点问题
            {
                To_Posts.HotCount = BBsConfig.HotCount;
            }
            if (type == "back")//已反馈
            {
                To_Posts.isback = "1";
            }
            if (type == "noback")//未反馈
            {
                To_Posts.isback = "0";
            }
            if (type == "myself")//我自己的问题
            {
                To_Posts.ReleaseUser = UserInfo.LoginName;
            }
        }
        if (!string.IsNullOrEmpty(typecid))//导航
        {
            int cid = 0;
            if (int.TryParse(typecid, out cid))
            {
                To_Posts.CID = cid;
            }
        }
        if (!string.IsNullOrEmpty(ss))
        {
            To_Posts.Title = ss;
        }
        if (!string.IsNullOrEmpty(fk))
        {
            To_Posts.isFeedback = 1;
        }
        DataTable dt = BLL_Post.GetPostsList(To_Posts, pageIndex, pageSize, orderBy, out totalpage);

        if (dt.Rows.Count > 0)
        {
            Re_InfoList.DataSource = dt;
            Re_InfoList.DataBind();
        }
        strtt = DividePage.Pager(pageSize, totalpage, pageIndex, url);//分页
    }
Example #2
0
    private void DataBind()
    {
        Call_WorkBillTO sto = new Call_WorkBillTO();

        #region 条件
        if (!string.IsNullOrEmpty(Request["code"]))
        {
            sto.CWB_Code = Request["code"].ToString().Trim();//存 客户名称
        }
        if (!string.IsNullOrEmpty(Request["cname"]))
        {
            sto.CWB_Remark = Request["cname"].ToString().Trim();//存 客户名称
        }
        if (!string.IsNullOrEmpty(Request["uname"]))
        {
            sto.CWB_Solution = Request["uname"].ToString().Trim();//存 用户名称
        }
        else
        {
            sto.CWB_Solution = strLoginUserName;
        }
        if (!string.IsNullOrEmpty(Request["stime"]))
        {
            DateTime dtStime = Convert.ToDateTime("1980-01-01");
            DateTime.TryParse(Request["stime"].ToString().Trim(), out dtStime);
            sto.CWB_CreateTime = dtStime;//保存操作开始时间
        }
        if (!string.IsNullOrEmpty(Request["etime"]))
        {
            DateTime dtEtime = Convert.ToDateTime("2250-01-01");
            DateTime.TryParse(Request["etime"].ToString().Trim(), out dtEtime);
            sto.CWB_OperationTime = dtEtime;//保存操作结束时间
        }

        if (!string.IsNullOrEmpty(Request["Owner"])) //存 客户所属工程师
        {
            sto.CWB_Description = Request["Owner"].ToString().Trim();
        }
        if (!string.IsNullOrEmpty(Request["sltType"]))
        {
            sto.CWB_Type = Convert.ToInt16(Request["sltType"].ToString().Trim());
            intSelected  = sto.CWB_Type;
        }
        if (!string.IsNullOrEmpty(Request["status"]))
        {
            int intStatus = 0;
            int.TryParse(Request["status"].ToString().Trim(), out intStatus);

            sto.CWB_Status = intStatus;
            intSelected    = sto.CWB_Type;
        }
        #endregion
        if (!string.IsNullOrEmpty(Request.QueryString["pageIndex"]))
        {
            int.TryParse(Request.QueryString["pageIndex"], out pageIndex);
        }
        HYTD.BLL.Call_WorkBillBLL bll = new HYTD.BLL.Call_WorkBillBLL();
        DataTable dt = bll.GetCall_WorkBillList(sto, pageIndex, pageSize, "", out rowCount);
        //分页
        string getUrl = "";
        if (Request.Url.Query.Length > 0 && Request.Url.Query.IndexOf("pageIndex") > -1 && Request.Url.Query.IndexOf("&") > -1)
        {
            getUrl = Request.Url.Query.Substring(Request.Url.Query.IndexOf("&"));
        }
        else if (Request.Url.Query.Length > 0)
        {
            getUrl = Request.Url.Query.Substring(1);
        }
        string url = "WorkBillList.aspx?pageIndex={0}&" + getUrl.Trim('&');
        strtt = DividePage.Pager(pageSize, rowCount, pageIndex, url);

        if (dt.Rows.Count > 0)
        {
            StringBuilder sbContent = new StringBuilder();
            string        strNew    = string.Empty;
            string        strEdit   = string.Empty;
            foreach (DataRow dr in dt.Rows)
            {
                strNew  = string.Format("<a href=\"javascript:;\" name=\"NewWorkBill\" onclick=\"NewWorkBill({0})\" >新建</a>   ", dr["CC_ID"]);
                strEdit = string.Format("<a href=\"javascript:;\" name=\"EditWorkBill\" onclick=\"EditWorkBill({0})\">修改</a>", dr["CWB_ID"].ToString());
                if (dr["CWB_Status"].ToString() != ((int)PublicEnum.CallWorkBillStatus.Visited).ToString())
                {
                    strEdit += string.Format("&nbsp;<a href=\"javascript:;\" name=\"EditWorkBill\" onclick=\"HuifangWorkBill({0})\">回访</a>", dr["CWB_ID"].ToString());
                }
                sbContent.AppendFormat("<tbody>");
                if (dr["CWB_Status"].ToString() == "服务中")
                {
                    sbContent.AppendFormat("<tr style=\"color:red;\">");
                }
                else
                {
                    sbContent.AppendFormat("<tr>");
                }
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\"><a href=\"javascript:;\"  onclick=\"ShowWorkBill({1})\">{0}</a></td>", dr["CWB_Code"].ToString(), dr["CWB_ID"].ToString());
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["C_Name"].ToString());
                sbContent.AppendFormat("<td class=\"by\" style=\"width:120px;\" title=\"{0}\">{0}&nbsp;</td>", dr["CC_Name"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CWB_CallInUserName"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CWB_CallInTel"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CreateUserName"]);
                sbContent.AppendFormat("<td class=\"num\" style=\"width:100px;\" title=\"{0}\">{0}&nbsp;</td>", getDataFormate(dr["CWB_CreateTime"].ToString()));
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["ServiceUserName"]);
                sbContent.AppendFormat("<td class=\"num\" style=\"width:100px;\" title=\"{0}\">{0}&nbsp;</td>", getDataFormate(dr["CWB_OperationTime"].ToString()));
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;({1})</td>", dr["CWB_Status"].ToString(), dr["MYDStatus"].ToString());
                //sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", "服务记录");
                sbContent.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", strNew + strEdit);
                sbContent.AppendFormat("</tr>");
                sbContent.AppendFormat("</tbody>");
            }

            script = sbContent.ToString();
        }
        else
        {
            script = "没有搜索到相关内容!";
        }
        //获取当前页
        //if (rowCount % pageSize == 0)
        //{
        //    pageNum = rowCount / pageSize;
        //}
        //else
        //{
        //    pageNum = (rowCount / pageSize) + 1;
        //}
    }
Example #3
0
    private void DataBind()
    {
        Call_CustomerTO sto = new Call_CustomerTO();

        #region 条件
        if (!string.IsNullOrEmpty(Request["cname"]))
        {
            sto.CC_Name = Request["cname"].ToString().Trim();//存客户名称
        }
        if (!string.IsNullOrEmpty(Request["uname"]))
        {
            sto.CC_UserName = Request["uname"].ToString().Trim(); //存用户名称
        }
        if (!string.IsNullOrEmpty(Request["Owner"]))              //存 客户所属工程师
        {
            sto.CC_Owner = Request["Owner"].ToString().Trim();
        }

        #endregion
        if (!string.IsNullOrEmpty(Request.QueryString["pageIndex"]))
        {
            pageIndex = int.Parse(Request.QueryString["pageIndex"]);
        }
        HYTD.BLL.Call_CustomerBLL bll = new HYTD.BLL.Call_CustomerBLL();
        DataTable dt = bll.GetCall_CustomerList(sto, pageIndex, pageSize, "", out rowCount);
        //分页
        string url = "CustomerList.aspx?pageIndex={0}&cname=" + sto.CC_Name + "&uname=" + sto.CC_UserName + "&owner=" + sto.CC_Owner;
        strtt = DividePage.Pager(pageSize, rowCount, pageIndex, url);

        if (dt.Rows.Count > 0)
        {
            StringBuilder sbContent = new StringBuilder();
            string        strNew    = string.Empty;
            string        strEdit   = string.Empty; sbContent.AppendFormat("<tbody>");
            foreach (DataRow dr in dt.Rows)
            {
                //strNew = string.Format("<a href=\"javascript:;\" onclick=\"EditCustomerInfo({0})\"  target=\"_block\">新建</a>", dr["CC_ID"].ToString());
                strEdit = string.Format("<a href=\"javascript:void(0);\" onclick=\"EditCustomerInfo({0})\">修改</a>", dr["CC_ID"].ToString());

                sbContent.AppendFormat("<tr>");
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["UserName"]);
                sbContent.AppendFormat("<td class=\"by\" title=\"{0}\">[{0}]{1}&nbsp;</td>", dr["CC_ID"], dr["CC_Name"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CC_UserName"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CC_Tel"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", getDateTime(dr["CC_CreateTime"].ToString(), 0));
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", getDateTime(dr["CC_ServiceStartTime"].ToString(), 1));
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", getDateTime(dr["CC_ServiceEndTime"].ToString(), 1));
                //sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CC_Url"]);
                //sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CC_Remark"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", getStatusName(dr["CC_Status"].ToString().Trim()));
                sbContent.AppendFormat("<td class=\"num\" >{0}&nbsp;</td>", strNew + strEdit);
                sbContent.AppendFormat("</tr>");
            }
            sbContent.AppendFormat("</tbody>");
            script = sbContent.ToString();
        }
        else
        {
            script = "没有搜索到相关内容!";
        }
        //获取当前页
        if (rowCount % pageSize == 0)
        {
            pageNum = rowCount / pageSize;
        }
        else
        {
            pageNum = (rowCount / pageSize) + 1;
        }
    }
Example #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (UserInfo.IsFeedback)
     {
         sn = "<input type=\"radio\" name=\"isAnonymity\" value=\"0\" checked=\"checked\" />实名";
     }
     else
     {
         sn = "<input type=\"radio\" name=\"isAnonymity\" value=\"1\" />匿名<input type=\"radio\" name=\"isAnonymity\" value=\"0\" checked=\"checked\" />实名";
     }
     if (UserInfo != null)
     {
         userName = UserInfo.LoginName;
         if (UserInfo.IsADUser)
         {
             intIsADUser = 1;
         }
         loginname = UserInfo.LoginName;
     }
     if (!IsPostBack)
     {
         listAllPost = pBll.GetPostsList();
         if (!string.IsNullOrEmpty(Request.QueryString["fatherID"]))
         {
             fatherID = Convert.ToInt32(Request.QueryString["fatherID"].ToString());
         }
         if (!string.IsNullOrEmpty(Request.QueryString["pageIndex"]))
         {
             pageIndex = int.Parse(Request.QueryString["pageIndex"]);
         }
         if (!string.IsNullOrEmpty(Request.QueryString["content"]))
         {
             content = Request.QueryString["content"].ToString().Trim().Replace("&nbsp;", "");
         }
         //增加浏览次数
         PostsBLL postBll = new PostsBLL();
         postModel            = postBll.GetPostsEntity(fatherID);
         postModel.LookCount += 1;
         postBll.UpdatePosts(postModel);
         cID = Convert.ToInt32(postModel.CID);
         //导航
         CategoryBLL     catBll  = new CategoryBLL();
         List <Category> listCat = catBll.GetCategoryList().Where(c => c.ID == cID).ToList();
         if (listCat.Count > 0)
         {
             Category catModel = listCat[0];
             catName = catModel.Name;
             catId   = catModel.ID.ToString();
         }
         title = "意见与反馈 - " + catName;
         //绑定回复数据
         if (content == "请输入搜索内容")
         {
             content = "";
         }
         repTo.Content  = content;
         repTo.FatherID = fatherID;
         string orderBy = " isReFeedback desc,ReDatetime asc";
         dtReposts = repBll.GetRePostsList(repTo, pageIndex, pageSize, orderBy, out rowCount);
         //分页
         string url = "detail.aspx?pageIndex={0}&fatherID=" + fatherID;
         strtt = DividePage.Pager(pageSize, rowCount, pageIndex, url);
         //获取当前页
         if (rowCount % pageSize == 0)
         {
             pageNum = rowCount / pageSize;
         }
         else
         {
             pageNum = (rowCount / pageSize) + 1;
         }
     }
 }
Example #5
0
    private void DataBind()
    {
        ActiveSuccessfullProductInfoTO sto = new ActiveSuccessfullProductInfoTO();

        #region 条件
        if (!string.IsNullOrEmpty(Request["cname"]))
        {
            sto.CustomerName = Request["cname"].ToString().Trim();//存 客户名称
        }
        if (!string.IsNullOrEmpty(Request["uname"]))
        {
            sto.LoginName = Request["uname"].ToString().Trim();//存 客户名称
        }
        if (!string.IsNullOrEmpty(Request["stime"]))
        {
            DateTime dtStime = Convert.ToDateTime("1980-01-01");
            DateTime.TryParse(Request["stime"].ToString().Trim(), out dtStime);
            sto.StartTime = dtStime.ToString();//保存操作开始时间
        }
        if (!string.IsNullOrEmpty(Request["etime"]))
        {
            DateTime dtEtime = Convert.ToDateTime("2250-01-01");
            DateTime.TryParse(Request["etime"].ToString().Trim(), out dtEtime);
            sto.EndTime = dtEtime.ToString();//保存操作结束时间
        }

        #endregion
        if (!string.IsNullOrEmpty(Request.QueryString["pageIndex"]))
        {
            int.TryParse(Request.QueryString["pageIndex"], out pageIndex);
        }
        BLL.ActiveSuccessfullProductInfoBLL bll = new BLL.ActiveSuccessfullProductInfoBLL();
        DataTable dt = bll.GetActiveSuccessfullProductInfoList(sto, pageIndex, pageSize, "", out rowCount);
        //分页
        string getUrl = "";
        if (Request.Url.Query.Length > 0 && Request.Url.Query.IndexOf("pageIndex") > -1 && Request.Url.Query.IndexOf("&") > -1)
        {
            getUrl = Request.Url.Query.Substring(Request.Url.Query.IndexOf("&"));
        }
        else if (Request.Url.Query.Length > 0)
        {
            getUrl = Request.Url.Query.Substring(1);
        }
        string url = "CustomerSuccessfullList.aspx?pageIndex={0}&" + getUrl.Trim('&');
        strtt = DividePage.Pager(pageSize, rowCount, pageIndex, url);

        if (dt.Rows.Count > 0)
        {
            StringBuilder sbContent = new StringBuilder();
            string        strNew    = string.Empty;
            string        strEdit   = string.Empty;
            foreach (DataRow dr in dt.Rows)
            {
                strNew = string.Format("&nbsp;&nbsp;<a href=\"#\" name=\"WorkBill\" tid=\"{0}\" onclick=\"showErrorInfo(this)\" >查看</a>", dr["ID"], dr["CC_ID"]);
                sbContent.AppendFormat("<tbody>");
                sbContent.AppendFormat("<tr>");
                sbContent.AppendFormat("<td class=\"by\" style=\"width:120px;\" title=\"{0}\">{0}&nbsp;</td>", dr["CC_Name"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CC_UserName"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CC_Tel"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["LoginName"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CName"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["IP"]);
                sbContent.AppendFormat("<td class=\"num\" style=\"width:100px;\" title=\"{0}\">{0}&nbsp;</td>", getDataFormate(dr["CreateDate"].ToString()));
                sbContent.AppendFormat("<td class=\"num\" tt='{0}'><div style='height:22px;overflow:hidden;width:120px'>{1}</div></td>", dr["ID"], dr["ErrorMessage"].ToString().Replace("$$", "$$<br \\>"));
                sbContent.AppendFormat("<td class=\"num\" >{0}&nbsp;</td>", strNew);
                sbContent.AppendFormat("</tr>");
                sbContent.AppendFormat("</tbody>");
            }

            script = sbContent.ToString();
        }
        else
        {
            script = "没有搜索到相关内容!";
        }
        //获取当前页
        //if (rowCount % pageSize == 0)
        //{
        //    pageNum = rowCount / pageSize;
        //}
        //else
        //{
        //    pageNum = (rowCount / pageSize) + 1;
        //}
    }
Example #6
0
    /// <summary>
    /// 日志列表
    /// </summary>
    private void LogList()
    {
        RePostsBLL    bll = new RePostsBLL();
        StringBuilder sb  = new StringBuilder();
        RePostsTO     sto = new RePostsTO();

        if (!string.IsNullOrEmpty(Request["select"]))
        {
            sto.CID = type = Convert.ToInt32(Request["select"].Trim());
        }
        if (!string.IsNullOrEmpty(Request["title"]))
        {
            sto.Title = txt = Request["title"].Trim();
        }
        if (!string.IsNullOrEmpty(Request["remark"]))
        {
            sto.Content = remark = Request["remark"].Trim();
        }
        if (!string.IsNullOrEmpty(Request["ip"]))
        {
            sto.UserIP = ip = Request["ip"].Trim();
        }
        if (!string.IsNullOrEmpty(Request["time"]))
        {
            sto.Time = time = Request["time"].Trim();
        }
        if (!string.IsNullOrEmpty(Request["endtime"]))
        {
            sto.EndTime = endtime = Request["endtime"].Trim();
        }
        if (!string.IsNullOrEmpty(Request["sendUser"]))
        {
            sto.SendUser = sendUser = Request["sendUser"].Trim();
        }
        if (!string.IsNullOrEmpty(Request["backUser"]))
        {
            sto.ReUser = backUser = Request["backUser"].Trim();
        }
        if (!string.IsNullOrEmpty(Request["niming"]))
        {
            sto.isAnonymity = niming = Convert.ToInt32(Request["niming"].Trim());
        }
        else
        {
            sto.isAnonymity = 400;
        }

        if (!string.IsNullOrEmpty(Request["fankui"]))
        {
            sto.isFeedback = fankui = Convert.ToInt32(Request["fankui"].Trim());
        }
        else
        {
            sto.isFeedback = 400;
        }
        if (!string.IsNullOrEmpty(Request.QueryString["pageIndex"]))
        {
            pageIndex = int.Parse(Request.QueryString["pageIndex"]);
        }
        DataTable dt = bll.GetNewTab(sto, pageIndex, pageSize, "", out rowCount);
        //分页
        string url = "Searchlog.aspx?pageIndex={0}&typecid=1110&select=" + type + "&title=" + txt + "&remark=" + remark + "&ip=" + ip + "&time=" + time + "&sendUser="******"&backUser="******"&niming=" + niming + "&fankui=" + fankui;

        strtt = DividePage.Pager(pageSize, rowCount, pageIndex, url);
        if (dt.Rows.Count > 0)
        {
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DataRow dr         = dt.Rows[i];
                string  status     = dr["status"].ToString();
                string  strContent = StringHelper.FilterHTML(dr["remark"].ToString().Trim()).Trim();
                if (strContent.Length == 0)
                {
                    strContent = "&nbsp";
                }

                string topic_ftcolor = "";
                if (Convert.ToInt32(dr["Ispos"]) == 1)
                {
                    topic_ftcolor = " style=\"font-weight:bold\"";
                }

                sb.AppendFormat("<tbody><tr><td class=\"by\" title=\"{0}\"  " + topic_ftcolor + ">[{1}]<a href=\"detail.aspx?pageIndex=1&fatherID={2}&num=0\" target=\"_back\">{3}</a></td>", dr["Title"], dr["Name"], dr["ID"],
                                HYTD.Common.StringHelper.SubString(dr["Title"].ToString(), 25));
                sb.AppendFormat("<td class=\"by\" title=\"{0}\">{1}&nbsp;</td>", strContent,
                                HYTD.Common.StringHelper.SubString(strContent, 25));
                //ispos  1表示发贴   0为回复内容
                if (Convert.ToInt32(dr["Ispos"]) == 1)
                {
                    sb.AppendFormat("<td class=\"num\">{0}&nbsp;<br />[{1}]</td>",
                                    dr["SendUserName"], PublicEnum.GetEnumDescription <PublicEnum.PubliucIsVidicate>(dr["isAnonymity"].ToString()));
                    sb.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", "");
                }
                else
                {
                    sb.AppendFormat("<td class=\"num\">{0}&nbsp;<br />[{1}]</td>", dr["SendUserName"], PublicEnum.GetEnumDescription <PublicEnum.PubliucIsVidicate>(dr["isAnonymity"].ToString()));
                    sb.AppendFormat("<td class=\"num\">{0}&nbsp;<br />[{1}]</td>", dr["ReUserName"], PublicEnum.GetEnumDescription <PublicEnum.PubliucIsVidicate>(dr["isAnonymity"].ToString()));
                }
                sb.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", PublicEnum.GetEnumDescription <PublicEnum.PubliucIsVidicate>(dr["isFeedback"].ToString()));
                sb.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", dr["retime"]);
                sb.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", dr["UserIP"]);
                if (status == "1")
                {
                    sb.AppendFormat("<td class=\"num\" style=\"width:40px\"><a href=\"javascript:;\"  onclick=\"javascript:DeleteReplyforLog({0},{1})\">删除</a></td></tr></tbody>", dr["IDNew"], dr["tp"]);
                }
                else
                {
                    sb.AppendFormat("<td class=\"num\" style=\"width:40px\"><a href=\"javascript:;\"  onclick=\"javascript:RecoverReplyforLog({0},{1})\" style=\"color:red;\">恢复显示</a></td></tr></tbody>", dr["IDNew"], dr["tp"]);
                }
            }
            script = sb.ToString();
        }
        else
        {
            script = "没有搜索到相关内容!";
        }
        //获取当前页
        if (rowCount % pageSize == 0)
        {
            pageNum = rowCount / pageSize;
        }
        else
        {
            pageNum = (rowCount / pageSize) + 1;
        }
    }
Example #7
0
    private void DataBind()
    {
        Call_SatisfactionNewTO sto = new Call_SatisfactionNewTO();

        #region 条件
        //if (!string.IsNullOrEmpty(Request["code"]))
        //{
        //    sto.CWB_Code = Request["code"].ToString().Trim();//存 客户名称
        //}
        //if (!string.IsNullOrEmpty(Request["cname"]))
        //{
        //    sto.CWB_Remark = Request["cname"].ToString().Trim();//存 客户名称
        //}
        //if (!string.IsNullOrEmpty(Request["uname"]))
        //{
        //    sto.CWB_Solution = Request["uname"].ToString().Trim();//存 用户名称
        //}
        //else
        //    sto.CWB_Solution = strLoginUserName;
        //if (!string.IsNullOrEmpty(Request["stime"]))
        //{
        //    DateTime dtStime = Convert.ToDateTime("1980-01-01");
        //    DateTime.TryParse(Request["stime"].ToString().Trim(), out dtStime);
        //    sto.CWB_CreateTime = dtStime;//保存操作开始时间
        //}
        //if (!string.IsNullOrEmpty(Request["etime"]))
        //{
        //    DateTime dtEtime = Convert.ToDateTime("2250-01-01");
        //    DateTime.TryParse(Request["etime"].ToString().Trim(), out dtEtime);
        //    sto.CWB_OperationTime = dtEtime;//保存操作结束时间
        //}

        //if (!string.IsNullOrEmpty(Request["Owner"])) //存 客户所属工程师
        //{

        //    sto.CWB_Description = Request["Owner"].ToString().Trim();
        //}
        //if (!string.IsNullOrEmpty(Request["sltType"]))
        //{
        //    sto.CWB_Type = Convert.ToInt16(Request["sltType"].ToString().Trim());
        //    intSelected = sto.CWB_Type;
        //}
        //if (!string.IsNullOrEmpty(Request["status"]))
        //{
        //    int intStatus = 0;
        //    int.TryParse(Request["status"].ToString().Trim(), out intStatus);

        //    sto.CWB_Status = intStatus;
        //    intSelected = sto.CWB_Type;
        //}
        #endregion
        if (!string.IsNullOrEmpty(Request.QueryString["pageIndex"]))
        {
            int.TryParse(Request.QueryString["pageIndex"], out pageIndex);
        }
        HYTD.BLL.Call_SatisfactionNewBLL bll = new HYTD.BLL.Call_SatisfactionNewBLL();
        DataTable dt = bll.GetCall_SatisfactionNewList(sto, pageIndex, pageSize, "", out rowCount);
        //分页
        string getUrl = "";
        if (Request.Url.Query.Length > 0 && Request.Url.Query.IndexOf("pageIndex") > -1 && Request.Url.Query.IndexOf("&") > -1)
        {
            getUrl = Request.Url.Query.Substring(Request.Url.Query.IndexOf("&"));
        }
        else if (Request.Url.Query.Length > 0)
        {
            getUrl = Request.Url.Query.Substring(1);
        }
        string url = "MYDList.aspx?pageIndex={0}&" + getUrl.Trim('&');
        strtt = DividePage.Pager(pageSize, rowCount, pageIndex, url);

        if (dt.Rows.Count > 0)
        {
            StringBuilder sbContent = new StringBuilder();
            string        strNew    = string.Empty;
            string        strEdit   = string.Empty;
            foreach (DataRow dr in dt.Rows)
            {
                strEdit = string.Format("<a href=\"javascript:;\" name=\"EditWorkBill\" onclick=\"EditWorkBill({0})\">查看</a>", dr["CSN_ID"].ToString());
                //if (dr["CWB_Status"].ToString() != ((int)PublicEnum.CallWorkBillStatus.Visited).ToString())
                //    strEdit += string.Format("&nbsp;<a href=\"javascript:;\" name=\"EditWorkBill\" onclick=\"HuifangWorkBill({0})\">回访</a>", dr["CSN_ID"].ToString());
                //sbContent.AppendFormat("<tbody>");
                //if (dr["CWB_Status"].ToString() == "服务中")
                //    sbContent.AppendFormat("<tr style=\"color:red;\">");
                //else
                //    sbContent.AppendFormat("<tr>");
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\"><a href=\"javascript:;\" >{0}</a></td>", dr["CC_Name"].ToString());
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CSN_UserIP"].ToString());
                sbContent.AppendFormat("<td class=\"by\" style=\"width:120px;\" title=\"{0}\">{0}&nbsp;</td>", dr["CSN_UserUrl"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CSN_UserCode"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CSN_ServiceUserCode"]);
                sbContent.AppendFormat("<td class=\"num\" style=\"width:100px;\" title=\"{0}\">{0}&nbsp;</td>", getDataFormate(dr["CSN_CreateDate"].ToString()));
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CSN_IsSolve"] == "0"?"未解决":"已解决");
                int intI = 0;
                int.TryParse(dr["CSN_ServiceEvaluation"].ToString(), out intI);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", getResultForDC(intI));
                intI = 0;
                int.TryParse(dr["CSN_ServiceEfficiency"].ToString(), out intI);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", getResultForDC(intI));
                intI = 0;
                int.TryParse(dr["CSN_ServiceAttitude"].ToString(), out intI);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", getResultForDC(intI));
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CSN_Improvement"]);
                sbContent.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", strNew + strEdit);
                sbContent.AppendFormat("</tr>");
                sbContent.AppendFormat("</tbody>");
            }

            script = sbContent.ToString();
        }
        else
        {
            script = "没有搜索到相关内容!";
        }
    }
Example #8
0
    private void DataBind()
    {
        Call_FAQListTO sto = new Call_FAQListTO();

        #region 条件
        if (!string.IsNullOrEmpty(Request["sltType"]))
        {
            sto.CF_SoftTypeID = Convert.ToInt32(Request["sltType"].ToString().Trim());//类型
        }
        if (!string.IsNullOrEmpty(Request["pErrorList"]))
        {
            sto.CF_ErrorList = Request["pErrorList"].ToString().Trim();//标题
        }
        //else
        //    sto.CF_SoftTypeID = Convert.ToInt32(Request["uname"].ToString().Trim());//存 用户名称
        if (!string.IsNullOrEmpty(Request["stime"]))
        {
            DateTime dtStime = Convert.ToDateTime("1980-01-01");
            DateTime.TryParse(Request["stime"].ToString().Trim(), out dtStime);
            sto.CF_AddDate = dtStime;//保存操作开始时间
        }
        if (!string.IsNullOrEmpty(Request["etime"]))
        {
            DateTime dtEtime = Convert.ToDateTime("2250-01-01");
            DateTime.TryParse(Request["etime"].ToString().Trim(), out dtEtime);
            sto.CF_EndDate = dtEtime;//保存操作结束时间
        }

        #endregion
        if (!string.IsNullOrEmpty(Request.QueryString["pageIndex"]))
        {
            int.TryParse(Request.QueryString["pageIndex"], out pageIndex);
        }
        HYTD.BLL.Call_FAQListBLL bll = new HYTD.BLL.Call_FAQListBLL();
        DataTable dt = bll.GetCall_FAQListList(sto, pageIndex, pageSize, "", out rowCount);
        //分页
        string getUrl = "";
        if (Request.Url.Query.Length > 0 && Request.Url.Query.IndexOf("pageIndex") > -1 && Request.Url.Query.IndexOf("&") > -1)
        {
            getUrl = Request.Url.Query.Substring(Request.Url.Query.IndexOf("&"));
        }
        else if (Request.Url.Query.Length > 0)
        {
            getUrl = Request.Url.Query.Substring(1);
        }
        string url = "FAQList.aspx?pageIndex={0}&" + getUrl.Trim('&');
        strtt = DividePage.Pager(pageSize, rowCount, pageIndex, url);

        if (dt.Rows.Count > 0)
        {
            int           num       = 0;
            StringBuilder sbContent = new StringBuilder();
            //string strNew = string.Empty;
            string strEdit   = string.Empty;
            string strDelete = string.Empty;
            foreach (DataRow dr in dt.Rows)
            {
                num++;
                //strNew = string.Format("<a href=\"javascript:;\" name=\"NewFAQ\" onclick=\"NewFAQ({0})\" >新建</a>   ", dr["CF_ID"]);
                strEdit   = string.Format("<a href=\"javascript:;\" name=\"EditFAQ\" onclick=\"EditFAQ({0})\">修改</a>", dr["CF_ID"].ToString());
                strDelete = string.Format("<a href=\"javascript:;\" name=\"DeleteFAQ\" onclick=\"DeleteFAQ({0})\">删除</a>", dr["CF_ID"].ToString());
                sbContent.AppendFormat("<tbody>");
                sbContent.AppendFormat("<tr>");
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", num);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\"><a href=\"javascript:;\"  onclick=\"ShowFAQ({1})\">{0}</a></td>", dr["CF_ErrorList"].ToString(), dr["CF_ID"].ToString());
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CF_Describe"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CF_AddDate"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", getSoftTypename(dr["CF_SoftTypeID"].ToString()));
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", getUsername(dr["CF_UserID"].ToString()));
                sbContent.AppendFormat("<td class=\"num\">{0}&nbsp;&nbsp;&nbsp;&nbsp;{1}</td>", strEdit, strDelete);
                sbContent.AppendFormat("</tr>");
                sbContent.AppendFormat("</tbody>");
            }

            script = sbContent.ToString();
        }
        else
        {
            script = "没有搜索到相关内容!";
        }
        //获取当前页
        //if (rowCount % pageSize == 0)
        //{
        //    pageNum = rowCount / pageSize;
        //}
        //else
        //{
        //    pageNum = (rowCount / pageSize) + 1;
        //}
    }
Example #9
0
    private void DataBind()
    {
        Call_WorkBillTO sto = new Call_WorkBillTO();

        #region 条件

        StringBuilder sb = new StringBuilder();
        sb.AppendFormat(" CWB_Status in(29,30) ");

        if (!string.IsNullOrEmpty(Request["code"]))
        {
            sb.AppendFormat(" and CWB_Code like '%{0}%' ", StringHelper.SQLFilter(Request["code"].ToString().Trim()));
        }
        if (!string.IsNullOrEmpty(Request["cname"]))
        {
            sb.AppendFormat(" and CC_Name like '%{0}%' ", StringHelper.SQLFilter(Request["cname"].ToString().Trim()));
        }
        if (!string.IsNullOrEmpty(Request["uname"]))
        {
            sb.AppendFormat(" and d.UserName like '%{0}%' ", StringHelper.SQLFilter(Request["uname"].ToString().Trim()));
        }
        else
        {
            sto.CWB_Solution = strLoginUserName;
        }
        sb.AppendFormat(" and CWB_OperationTime < '{0}' ", DateTime.Now.ToString("yyyy-MM-dd"));
        if (!string.IsNullOrEmpty(Request["stime"]))
        {
            DateTime dtStime = Convert.ToDateTime("1980-01-01");
            DateTime.TryParse(Request["stime"].ToString().Trim(), out dtStime);
            sb.AppendFormat(" and CWB_CreateTime >= '{0}' ", dtStime.ToString("yyyy-MM-dd"));
        }

        if (!string.IsNullOrEmpty(Request["etime"]))
        {
            DateTime dtEtime = Convert.ToDateTime("2250-01-01");
            DateTime.TryParse(Request["etime"].ToString().Trim(), out dtEtime);
            sb.AppendFormat(" and CWB_CreateTime < '{0}' ", dtEtime.AddDays(1).ToString("yyyy-MM-dd"));
        }

        if (!string.IsNullOrEmpty(Request["status"]))
        {
            int intstatus = 0;
            int.TryParse(Request["status"].ToString().Trim(), out intstatus);
            if (intstatus > 0)
            {
                sb.AppendFormat(" and CWB_MYDStatus = {0} ", intstatus);
            }
        }

        #endregion
        if (!string.IsNullOrEmpty(Request.QueryString["pageIndex"]))
        {
            int.TryParse(Request.QueryString["pageIndex"], out pageIndex);
        }
        HYTD.BLL.Call_WorkBillBLL bll = new HYTD.BLL.Call_WorkBillBLL();
        DataTable dt = bll.GetCall_WorkBillList(sb.ToString(), pageIndex, pageSize, "", out rowCount);
        //分页
        string getUrl = "";
        if (Request.Url.Query.Length > 0 && Request.Url.Query.IndexOf("pageIndex") > -1 && Request.Url.Query.IndexOf("&") > -1)
        {
            getUrl = Request.Url.Query.Substring(Request.Url.Query.IndexOf("&"));
        }
        else if (Request.Url.Query.Length > 0)
        {
            getUrl = Request.Url.Query.Substring(1);
        }
        string url = "SatisfactionList.aspx?pageIndex={0}&" + getUrl.Trim('&');
        strtt = DividePage.Pager(pageSize, rowCount, pageIndex, url);

        if (dt.Rows.Count > 0)
        {
            StringBuilder sbContent = new StringBuilder();
            string        strNew    = string.Empty;
            string        strEdit   = string.Empty;
            foreach (DataRow dr in dt.Rows)
            {
                strNew = string.Format("<a href=\"javascript:;\" name=\"NewWorkBill\" onclick=\"NewWorkBill({0})\" >新建</a>   ", dr["CC_ID"]);
                if (dr["CWB_Status"].ToString() != ((int)PublicEnum.CallWorkBillStatus.Visited).ToString())
                {
                    strEdit = string.Format("&nbsp;<a href=\"javascript:;\" name=\"EditWorkBill\" onclick=\"HuifangWorkBill({0})\">满意度</a>", dr["CWB_ID"].ToString());
                }
                sbContent.AppendFormat("<tbody>");
                if (dr["MYDStatus"].ToString() == "待调查")
                {
                    sbContent.AppendFormat("<tr style=\"color:red;\">");
                }
                else
                {
                    sbContent.AppendFormat("<tr>");
                }
                //sbContent.AppendFormat("<tr>");
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\"><a href=\"javascript:;\"  onclick=\"ShowWorkBill({1})\">{0}</a></td>", dr["CWB_Code"].ToString(), dr["CWB_ID"].ToString());
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["C_Name"].ToString());
                sbContent.AppendFormat("<td class=\"by\" style=\"width:120px;\" title=\"{0}\">{0}&nbsp;</td>", dr["CC_Name"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CWB_CallInUserName"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CWB_CallInTel"]);
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["CreateUserName"]);
                sbContent.AppendFormat("<td class=\"num\" style=\"width:100px;\" title=\"{0}\">{0}&nbsp;</td>", getDataFormate(dr["CWB_CreateTime"].ToString()));
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["ServiceUserName"]);
                sbContent.AppendFormat("<td class=\"num\" style=\"width:100px;\" title=\"{0}\">{0}&nbsp;</td>", getDataFormate(dr["CWB_OperationTime"].ToString()));
                sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", dr["MYDStatus"].ToString());
                //sbContent.AppendFormat("<td class=\"num\" title=\"{0}\">{0}&nbsp;</td>", "服务记录");
                sbContent.AppendFormat("<td class=\"num\">{0}&nbsp;</td>", strNew + strEdit);
                sbContent.AppendFormat("</tr>");
                sbContent.AppendFormat("</tbody>");
            }

            script = sbContent.ToString();
        }
        else
        {
            script = "没有搜索到相关内容!";
        }
        //获取当前页
        //if (rowCount % pageSize == 0)
        //{
        //    pageNum = rowCount / pageSize;
        //}
        //else
        //{
        //    pageNum = (rowCount / pageSize) + 1;
        //}
    }