コード例 #1
0
        protected void lnkBtnSendSheetState_Click(object sender, EventArgs e)
        {
            string sheetState = hf_sheetStateStr.Value;//工单状态

            BLL.Common.Logger.Error("点击按钮,工单状态为:" + sheetState);
            if (sheetState == "已受理")
            {
                //修改状态为处理
                Dictionary <string, object> dic = new Dictionary <string, object>();
                dic.Add("ID", hf_sheetID);                         //工单主键
                dic.Add("MainID", MainID);                         //服务商主键
                dic.Add("UserID", UserID);                         //操作人主键
                dic.Add("UpdateDime", DateTime.Now.ToString("s")); //修改时间
                dic.Add("UpdateType", "UpdateState");              //修改类型
                dic.Add("UpdateDetail", "3");                      //修改的内容  “3”为处理中

                JavaScriptSerializer js = new JavaScriptSerializer();
                js.MaxJsonLength = int.MaxValue;

                string json = js.Serialize(dic);

                BLL.SheetBL sheetBL = new SheetBL();
                long        result  = sheetBL.UpdateAPPSheet(json);
                BLL.Common.Logger.Error("点击处理后返回数据result,大于0则执行成功:" + result);
                if (result > 0)
                {
                    Response.Write("<script>window.reload();</script>");
                }
            }
            if (sheetState == "处理中")
            {
                //修改状态为完成
            }
        }
コード例 #2
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            //获取消息类型文字,图片,声音等
            string replyType = context.Request.QueryString["type"];
            string returnStr = string.Empty;

            switch (replyType)
            {
            case "Character":
            {
                //returnStr = GetPatrolRecord(long.Parse(context.Request.QueryString["id"].ToString()));
                string  jsonStr   = GetReplyResult(context);
                SheetBL bl        = new SheetBL();
                long    sqlResult = bl.InsertAPPChat(jsonStr);
                BLL.Common.Logger.Error("操作数据库返回的值:" + sqlResult);
                if (sqlResult > 0)
                {
                    returnStr = "success";
                }
            }
            break;

            case "PIC":
            { returnStr = ""; }
            break;
            }

            context.Response.Write(returnStr);
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!String.IsNullOrEmpty(Request.QueryString["SheetType"]))
                {
                    string  sheetType = Request.QueryString["SheetType"].ToString();
                    SheetBL blSheet   = new SheetBL();
                    //获取单单列表
                    string sheetTypes = blSheet.GetAPPSheetList(MainID, UserID, sheetType, null);
                    HF.Cloud.BLL.Common.Logger.Error("sheetTypes------返回的sheetList-json字符串-------:" + sheetTypes);
                    //处理json


                    JArray arrySheetTypes = JArray.Parse(sheetTypes);
                    for (int i = 0; i < arrySheetTypes.Count; i++)
                    {
                        JObject objType  = JObject.Parse(arrySheetTypes[i].ToString());
                        string  typeName = objType["TypeName"].ToString();
                        // HF.Cloud.BLL.Common.Logger.Error("------typeName:-----"+ typeName);
                        JArray arrySheets = JArray.Parse(objType["Detail"].ToString());
                        if (arrySheets.Count > 0)
                        {
                            //htmlstr.Append("<div>" + typeName + "</div>");
                            htmlstr.Append("<div class=\"sheetType-listTitle\">" + typeName + "</div>");
                            for (int j = 0; j < arrySheets.Count; j++)
                            {
                                JObject objSheet     = JObject.Parse(arrySheets[j].ToString());
                                string  sheetID      = objSheet["ID"].ToString();
                                string  clientName   = objSheet["ClientName"].ToString();
                                string  sheetMessage = objSheet["Message"].ToString();
                                string  writeTime    = objSheet["WriteTime"].ToString();
                                //htmlstr.Append("<div>ID:" + sheetID + "客户:" + clientName + "</div>");
                                //htmlstr.Append("<div><a href='SheetDetail.aspx?dd_nav_bgcolor=FF5E97F6&sheetID=" + sheetID + "'>状态:" + objSheet["SheetStateCN"].ToString() + "消息:" + objSheet["WriteTime"].ToString() + "</a>---" + objSheet["WriteTime"].ToString() + "</div>");

                                htmlstr.Append("<div class=\"sheetType-div\">");
                                htmlstr.Append("<a href=\"SheetDetail.aspx?dd_nav_bgcolor=FF5E97F6&sheetID=" + sheetID + "\">");
                                htmlstr.Append("<div style=\"height:30px;\">");
                                htmlstr.Append("<label class=\"sheetType-sheetID\">" + sheetID + "</label>");
                                htmlstr.Append("<label class=\"sheetType-customName\">" + clientName + "</label>");
                                htmlstr.Append("</div>");
                                htmlstr.Append("<p class=\"sheetType-sheetContent\">" + sheetMessage + "</p>");
                                htmlstr.Append("<p class=\"sheetType-time\">" + writeTime + "</p>");
                                htmlstr.Append("</a></div >");
                                htmlstr.Append("");
                                //HF.Cloud.BLL.Common.Logger.Error("---------表单信息-----ID:" + sheetID + "clientName:" + clientName);
                            }
                        }
                    }
                }
            }
        }
コード例 #4
0
        public string configStr = "";//config配置
        protected void Page_Load(object sender, EventArgs e)
        {
            HF.Cloud.BLL.Common.Logger.Error("addSheet001----------------");
            HF.Cloud.BLL.Common.Logger.Error("Request.Url.ToString():" + Request.Url.ToString());
            configStr       = AuthHelper.getConfig(Request.Url.ToString());//url传入当前的url
            hf_config.Value = configStr;
            if (!IsPostBack)
            {
                HF.Cloud.BLL.Common.Logger.Error("addSheet页面configStr:" + configStr);
                hf_mainID.Value    = MainID.ToString();
                hf_WriteID.Value   = UserID.ToString();
                hf_dd_userid.Value = dd_Userid;//钉钉的userid
                ClientBL Clientbll = new ClientBL();
                //绑定客户名称
                DataTable dt_Client = new DataTable();
                dt_Client = Clientbll.GetQuyClientByMainIDAndQuy(MainID, "");
                ddlCustomer.DataSource     = dt_Client;
                ddlCustomer.DataTextField  = "ClientName";
                ddlCustomer.DataValueField = "ID";
                ddlCustomer.DataBind();
                ddlCustomer.Items.Insert(0, new ListItem("--请选择--", "-1"));


                //绑定工单类型
                SheetBL   bl           = new SheetBL();
                DataTable dt_SheetType = new DataTable();
                dt_SheetType                = bl.GetSheetTypeByMainID(MainID);
                ddlSheetType.DataSource     = dt_SheetType;
                ddlSheetType.DataTextField  = "TypeName";
                ddlSheetType.DataValueField = "ID";
                ddlSheetType.DataBind();
                ddlSheetType.Items.Insert(0, new ListItem("--请选择--", "-1"));


                //绑定服务商的服务组(比如技术组,商务组)
                UserBLL   userbll     = new UserBLL();
                DataTable dt_TeamList = new DataTable();
                dt_TeamList            = userbll.GetTeamListBYMainID(MainID);
                ddlTeam.DataSource     = dt_TeamList;
                ddlTeam.DataTextField  = "TeamName";
                ddlTeam.DataValueField = "ID";
                ddlTeam.DataBind();
                ddlTeam.Items.Insert(0, new ListItem("--请选择--", "-1"));
            }
        }
コード例 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SheetBL   shBLL = new SheetBL();
            DataTable dt    = new DataTable();

            try
            {
                dt = shBLL.GetAPPMainShow(MainID, UserID);//获取人员所在组
                HF.Cloud.BLL.Common.Logger.Error("SheetType.aspx页面dt.rows:" + dt.Rows.Count + "---MainID:" + MainID + "----userID:" + UserID);
                //dt.Columns.Add("NoAccepted", typeof(int));//未受理
                //dt.Columns.Add("MyNoFinish", typeof(int));//我的未完成
                //dt.Columns.Add("TeamNoFinish", typeof(int));//组未完成
                //dt.Columns.Add("AllNoFinish", typeof(int));//所有未完成
                //dt.Columns.Add("MyFinish", typeof(int)); //我已完成
                //dt.Columns.Add("All", typeof(int));//全部工单
                //dt.Columns.Add("Urgent", typeof(int)); //紧急工单
            }
            catch (Exception err)
            {
                HF.Cloud.BLL.Common.Logger.Error("GetSheetListByStatus Error", err);
            }

            //for(int i=0;i<7;i++)
            //{
            //    htmlStr+= "<div> <label>"+ dt.Columns[i].ToString() + "</label> <label>"+ dt.Rows[0][i].ToString() + "</label></div>";
            //}
            //htmlStr.Append("<div><a href = \"SheetList.aspx?dd_nav_bgcolor=FF5E97F6&SheetType=" + dt.Columns[0].ToString() + "\" >未受理 </ a ><label>" + dt.Rows[0][0].ToString() + "</label></div>");
            //htmlStr.Append("<div><a href = \"SheetList.aspx?dd_nav_bgcolor=FF5E97F6&SheetType=" + dt.Columns[1].ToString() + "\" >我的未完成 </ a ><label>" + dt.Rows[0][1].ToString() + "</label></div>");
            //htmlStr.Append("<div><a href = \"SheetList.aspx?dd_nav_bgcolor=FF5E97F6&SheetType=" + dt.Columns[2].ToString() + "\" > 组未完成</ a ><label>" + dt.Rows[0][2].ToString() + "</label></div>");
            //htmlStr.Append("<div><a href = \"SheetList.aspx?dd_nav_bgcolor=FF5E97F6&SheetType=" + dt.Columns[3].ToString() + "\" > 所有未完成</ a ><label>" + dt.Rows[0][3].ToString() + "</label></div>");
            //htmlStr.Append("<div><a href = \"SheetList.aspx?dd_nav_bgcolor=FF5E97F6&SheetType=" + dt.Columns[4].ToString() + "\" >我已完成 </ a ><label>" + dt.Rows[0][4].ToString() + "</label></div>");
            //htmlStr.Append("<div><a href = \"SheetList.aspx?dd_nav_bgcolor=FF5E97F6&SheetType=" + dt.Columns[5].ToString() + "\" >全部工单 </ a ><label>" + dt.Rows[0][5].ToString() + "</label></div>");
            //htmlStr.Append("<div><a href = \"SheetList.aspx?dd_nav_bgcolor=FF5E97F6&SheetType=" + dt.Columns[6].ToString() + "\" > 紧急工单</ a ><label>" + dt.Rows[0][6].ToString() + "</label></div>");

            htmlStr.Append("<div class=\"oneself-list eweic-top div_height\"><div class=\"innerdiv\"><a href = \"SheetList.aspx?dd_nav_bgcolor=FF5E97F6&SheetType=" + dt.Columns[0].ToString() + "\" ><img class=\"img_style\"  src=\"../img/c.png\" /> <label class=\"label_style\" >未受理 </label><label class=\"label_style\">" + dt.Rows[0][0].ToString() + "</label></a></div></div>");
            htmlStr.Append("<div class=\"oneself-list eweic-top div_height\"><div class=\"innerdiv\"><a href = \"SheetList.aspx?dd_nav_bgcolor=FF5E97F6&SheetType=" + dt.Columns[1].ToString() + "\" ><img class=\"img_style\"  src=\"../img/c.png\" /> <label class=\"label_style\" >我的未完成 </label><label class=\"label_style\">" + dt.Rows[0][1].ToString() + "</label></a></div></div>");
            htmlStr.Append("<div class=\"oneself-list eweic-top div_height\"><div class=\"innerdiv\"><a href = \"SheetList.aspx?dd_nav_bgcolor=FF5E97F6&SheetType=" + dt.Columns[2].ToString() + "\" ><img class=\"img_style\"  src=\"../img/c.png\" /> <label class=\"label_style\" >组未完成 </label><label class=\"label_style\">" + dt.Rows[0][2].ToString() + "</label></a></div></div>");
            htmlStr.Append("<div class=\"oneself-list eweic-top div_height\"><div class=\"innerdiv\"><a href = \"SheetList.aspx?dd_nav_bgcolor=FF5E97F6&SheetType=" + dt.Columns[3].ToString() + "\" ><img class=\"img_style\"  src=\"../img/c.png\" /> <label class=\"label_style\" >所有未完成</label><label class=\"label_style\">" + dt.Rows[0][3].ToString() + "</label></a></div></div>");
            htmlStr.Append("<div class=\"oneself-list eweic-top div_height\"><div class=\"innerdiv\"><a href = \"SheetList.aspx?dd_nav_bgcolor=FF5E97F6&SheetType=" + dt.Columns[4].ToString() + "\" ><img class=\"img_style\"  src=\"../img/c.png\" /> <label class=\"label_style\" >我已完成 </label><label class=\"label_style\">" + dt.Rows[0][4].ToString() + "</label></a></div></div>");
            htmlStr.Append("<div class=\"oneself-list eweic-top div_height\"><div class=\"innerdiv\"><a href = \"SheetList.aspx?dd_nav_bgcolor=FF5E97F6&SheetType=" + dt.Columns[5].ToString() + "\" ><img class=\"img_style\"  src=\"../img/c.png\" /> <label class=\"label_style\" >全部工单 </label><label class=\"label_style\">" + dt.Rows[0][5].ToString() + "</label></a></div></div>");
            htmlStr.Append("<div class=\"oneself-list eweic-top div_height\"><div class=\"innerdiv\"><a href = \"SheetList.aspx?dd_nav_bgcolor=FF5E97F6&SheetType=" + dt.Columns[6].ToString() + "\" ><img class=\"img_style\"  src=\"../img/c.png\" /> <label class=\"label_style\" >紧急工单 </label><label class=\"label_style\">" + dt.Rows[0][6].ToString() + "</label></a></div></div>");
        }
コード例 #6
0
        public string writeTimeStr  = string.Empty;  //创建时间

        protected void Page_Load(object sender, EventArgs e)
        {
            string sheetID = string.Empty;

            if (!IsPostBack)
            {
                if (!String.IsNullOrEmpty(Request.QueryString["sheetID"]))
                {
                    sheetID = Request.QueryString["sheetID"].ToString();
                }
                hf_sheetID.Value  = sheetID;
                hf_mainID.Value   = MainID.ToString();
                hf_sendID.Value   = UserID.ToString();
                hf_sendTime.Value = DateTime.Now.ToString();
                //获取当前工单
                SheetBL   shBLL = new SheetBL();
                DataTable dt    = new DataTable();
                dt = shBLL.GetAPPSheetBYID(long.Parse(sheetID));

                sheetIDStr    = sheetID;
                sheetTypeStr  = dt.Rows[0]["TypeName"].ToString();
                sheetStateStr = dt.Rows[0]["SheetStateCN"].ToString();

                writerNameStr = dt.Rows[0]["WriterName"].ToString();
                writeTimeStr  = dt.Rows[0]["WriteTime"].ToString();



                //获取回复列表
                SheetBL bl = new SheetBL();

                string replyStr = string.Empty;
                if (String.IsNullOrEmpty(Request.QueryString["chatID"]))
                {
                    replyStr = bl.GetAPPSheetChatListBYChatID(0, long.Parse(sheetID));
                }
                else
                {
                    string chatIDStr = Request.QueryString["chatID"];
                    replyStr = bl.GetAPPSheetChatListBYChatID(long.Parse(chatIDStr), long.Parse(sheetID));
                }


                List <Dictionary <string, object> > json = new List <Dictionary <string, object> >();
                JavaScriptSerializer js = new JavaScriptSerializer();
                js.MaxJsonLength = int.MaxValue;
                json             = js.Deserialize <List <Dictionary <string, object> > >(replyStr);
                //if (json.Count < 1)
                //{
                //    //显示已全部加载
                //    string js_loading = "<script language=javascript>dd.ready(function () {dd.device.notification.toast({ text: '已全部加载...' }); });</script>";
                //    HttpContext.Current.Response.Write(js_loading);
                //}
                //else
                //{
                hf_chatID.Value   = json[json.Count - 1]["ID"].ToString(); //保存charID最小值,刷新用
                hf_userName.Value = UserName;                              //当前用户名字                                                 //for(int i=0;i<json.Count;i++)
                for (int i = json.Count - 1; i > -1; i--)
                {
                    //HF.Cloud.BLL.Common.Logger.Error("---" + i);
                    //BLL.Common.Logger.Error("回复类型:" + json[i]["MessageType"].ToString());
                    string userName   = json[i]["UserName"].ToString();
                    string sendTime   = json[i]["SendTime"].ToString();
                    string sendDetail = json[i]["SendDetail"].ToString();
                    if (json[i]["MessageType"].ToString() == "Character")    //如果是文字的话
                    {
                        if (userName == UserName)
                        {
                            //htmlStr.Append("<div style='background-color:#CCFFFF'>" + userName + " - " + sendTime + "</div>");
                            //htmlStr.Append("<div>" + sendDetail + "</div>");
                            //htmlStr.Append("<div>---</div>");

                            htmlStr.Append("<div class=\"SheetReply_bigDIV\">");
                            htmlStr.Append("<div class=\"SheetReply_replyTitle\">");
                            htmlStr.Append("<div class=\"SheetReply_imgDIV_right\">");
                            htmlStr.Append("<img src=\"../img/z.png\"/>");
                            htmlStr.Append("</div>");
                            htmlStr.Append("<div class=\"SheetReply_nameDIV_right\">");
                            htmlStr.Append("<P>" + userName + "</P>");
                            htmlStr.Append("<P class=\"SheetReply_timeDIV\">" + sendTime + "</P>");
                            htmlStr.Append("</div>");
                            htmlStr.Append("</div>");
                            htmlStr.Append("<div class=\"SheetReply_replyDIV_right\">");
                            htmlStr.Append("<p>" + sendDetail + "</p>");
                            htmlStr.Append("</div>");
                            htmlStr.Append("</div>");
                        }
                        else
                        {
                            //htmlStr.Append("<div>" + userName + " - " + sendTime + "</div>");
                            //htmlStr.Append("<div>" + sendDetail + "</div>");
                            //htmlStr.Append("<div>---</div>");
                            htmlStr.Append("<div class=\"SheetReply_bigDIV\">");
                            htmlStr.Append("<div class=\"SheetReply_replyTitle\">");
                            htmlStr.Append("<div class=\"SheetReply_imgDIV\">");
                            htmlStr.Append("<img src=\"../img/z.png\"/>");
                            htmlStr.Append("</div>");
                            htmlStr.Append("<div class=\"SheetReply_nameDIV\">");
                            htmlStr.Append("<P>" + userName + "</P>");
                            htmlStr.Append("<P class=\"SheetReply_timeDIV\">" + sendTime + "</P>");
                            htmlStr.Append("</div>");
                            htmlStr.Append("</div>");
                            htmlStr.Append("<div class=\"SheetReply_replyDIV\">");
                            htmlStr.Append("<p>" + sendDetail + "</p>");
                            htmlStr.Append("</div>");
                            htmlStr.Append("</div>");
                        }
                    }
                    if (json[i]["MessageType"].ToString() == "PIC")    //如果是图片
                    {
                        if (userName == UserName)
                        {
                            htmlStr.Append("<div style='background-color:#CCFFFF'>" + userName + " - " + sendTime + "</div>");
                            htmlStr.Append("<div>" + sendDetail + "</div>");
                            htmlStr.Append("<div>---</div>");
                        }
                        else
                        {
                            htmlStr.Append("<div>" + userName + " - " + sendTime + "</div>");
                            htmlStr.Append("<div>" + sendDetail + "</div>");
                            htmlStr.Append("<div>---</div>");
                        }
                    }
                }
                //}
            }
        }
コード例 #7
0
        public void ProcessRequest(HttpContext context)
        {
            string returnStr = string.Empty;

            context.Response.ContentType = "text/plain";

            string mainIDStr      = context.Request["MainID"].ToString();
            string clientIDStr    = context.Request["ClientID"].ToString();
            string writeIDStr     = context.Request["WriteID"].ToString();
            string sheetTypeStr   = context.Request["SheetType"].ToString();
            string sheetDetailStr = context.Request["SheetDetail"].ToString();
            string teamIDStr      = context.Request["TeamID"].ToString();
            string acceptIDStr    = context.Request["AcceptID"].ToString();
            string linkNameStr    = context.Request["LinkName"].ToString();
            string linkTelStr     = context.Request["LinkTel"].ToString();

            HF.Cloud.BLL.Common.Logger.Error("-mainIDStr:" + mainIDStr +
                                             "-clientIDStr:" + clientIDStr + "-writeIDStr:" + writeIDStr +
                                             "-sheetTypeStr:" + sheetTypeStr + "-sheetDetailStr:" + sheetDetailStr +
                                             "-teamIDStr:" + teamIDStr + "-acceptIDStr:" + acceptIDStr +
                                             "-linkNameStr:" + linkNameStr
                                             + "-linkTelStr:" + linkTelStr);

            Dictionary <string, object> dic = new Dictionary <string, object>();

            dic.Add("MainID", mainIDStr);
            dic.Add("ClientID", clientIDStr);
            dic.Add("WriteID", writeIDStr);
            dic.Add("SheetType", sheetTypeStr);
            dic.Add("SheetDetail", sheetDetailStr);
            dic.Add("TeamID", teamIDStr);
            dic.Add("AcceptID", acceptIDStr);
            dic.Add("LinkName", linkNameStr);
            dic.Add("LinkTel", linkTelStr);

            dic.Add("ContactID", "");
            dic.Add("WriteTime", DateTime.Now.ToString());
            dic.Add("WriteAdr", "");
            dic.Add("SheetTitle", "");
            dic.Add("SheetPriority", "3");
            dic.Add("SheetState", "2");
            dic.Add("FollowID", "");
            dic.Add("AssetID", "0");
            dic.Add("DataType", "1");//消息数据类型


            JavaScriptSerializer js = new JavaScriptSerializer();

            js.MaxJsonLength = int.MaxValue;
            string json = js.Serialize(dic);

            long    sheet_ReplyID = 0;
            SheetBL bl            = new SheetBL();

            try {
                sheet_ReplyID = bl.InsertAPPNewSheet(json);
            }
            catch (Exception ex)
            {
                HF.Cloud.BLL.Common.Logger.Error("addSheet Error", ex);
            }

            if (sheet_ReplyID > 0)
            {
                returnStr = sheet_ReplyID.ToString();
            }

            context.Response.Write(returnStr);
        }
コード例 #8
0
        public void ProcessRequest(HttpContext context)
        {
            string result = string.Empty;

            context.Response.ContentType = "text/plain";
            HF.Cloud.BLL.Common.Logger.Error("sheetMessage.ashx进来了");
            if (!string.IsNullOrEmpty(context.Request.QueryString["sheetID"]) && !string.IsNullOrEmpty(context.Request.QueryString["chatID"]))
            {
                string sheetID = context.Request.QueryString["sheetID"].ToString();
                string chatID  = context.Request.QueryString["chatID"].ToString();
                HF.Cloud.BLL.Common.Logger.Error("sheetID:" + sheetID + "chatID:" + chatID);
                //获取回复列表
                SheetBL bl       = new SheetBL();
                string  replyStr = bl.GetAPPSheetChatListBYChatID(long.Parse(chatID), long.Parse(sheetID));

                List <Dictionary <string, object> > json = new List <Dictionary <string, object> >();
                JavaScriptSerializer js = new JavaScriptSerializer();
                js.MaxJsonLength = int.MaxValue;
                json             = js.Deserialize <List <Dictionary <string, object> > >(replyStr);

                if (json.Count > 0)
                {
                    string chatID_return = json[json.Count - 1]["ID"].ToString(); //保存charID最小值,刷新用
                    result += "{\"result\":[";
                    for (int i = json.Count - 1; i > -1; i--)                     //这样可以使新数据在最下面,老数据在上面
                    {
                        string userName   = json[i]["UserName"].ToString();
                        string sendTime   = json[i]["SendTime"].ToString();
                        string sendDetail = json[i]["SendDetail"].ToString();


                        result += "{\"name\":\"" + userName;
                        result += "\",";
                        result += "\"time\":\"" + sendTime;
                        result += "\",";
                        result += "\"detail\":\"" + sendDetail;
                        result += "\"},";
                    }
                    result  = result.Substring(0, result.Length - 1);//确定最后一个逗号
                    result += "],\"chatID\":\"" + chatID_return;
                    result += "\"}";
                }
                else
                {
                    result = "";
                }
                //string dd = "{\"result\":[{\"name\":\"张三\",\"time\":\"2017-2-3\",\"detail\":\"付电话费舒服的书\"},{\"name\":\"李四\",\"time\":\"2012-2-2\",\"detail\":\"还没见过图\"}],\"chatID\":\"232\"}";
                //    result += "{\"result\":[";
                ////用于循环
                //result += "{\"name\":\""+"张三";
                //result += "\",";
                //result += "\"time\":\""+ "2017-2-3";
                //result += "\",";
                //result += "\"detail\":\""+"内容";
                //result += "\"},";


                //result += "],\"chatID\":\""+"123";
                //result += "\"}";
            }
            HF.Cloud.BLL.Common.Logger.Error(result);
            context.Response.Write(result);
        }
コード例 #9
0
        public string sheetSummaryStr = string.Empty; //工单总结
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!String.IsNullOrEmpty(Request.QueryString["sheetID"]))
                {
                    string sheetID = Request.QueryString["sheetID"].ToString();
                    hf_sheetID.Value = sheetID;
                    //hf_mainID.Value = MainID.ToString();
                    //hf_sendID.Value = UserID.ToString();
                    //hf_sendTime.Value = DateTime.Now.ToString();
                    SheetBL   shBLL = new SheetBL();
                    DataTable dt    = new DataTable();
                    dt = shBLL.GetAPPSheetBYID(long.Parse(sheetID));

                    sheetIDStr    = sheetID;
                    sheetTypeStr  = dt.Rows[0]["TypeName"].ToString();
                    sheetStateStr = dt.Rows[0]["SheetStateCN"].ToString();

                    writerNameStr = dt.Rows[0]["WriterName"].ToString();
                    writeTimeStr  = dt.Rows[0]["WriteTime"].ToString();

                    clientNameStr = dt.Rows[0]["ClientName"].ToString();
                    clientAdrStr  = dt.Rows[0]["ClientAdr"].ToString();
                    contactStr    = dt.Rows[0]["Contact"].ToString();
                    dianhuaStr    = dt.Rows[0]["dianhua"].ToString();

                    userNameStr = dt.Rows[0]["UserName"].ToString();

                    sheetDetailStr  = dt.Rows[0]["SheetDetail"].ToString();
                    sheetSummaryStr = dt.Rows[0]["SheetSummary"].ToString();



                    hf_userNameStr.Value   = userNameStr;   //受理人
                    hf_userName.Value      = UserName;      //当前用户名字
                    hf_sheetStateStr.Value = sheetStateStr; //工单状态


                    ////获取回复列表
                    //SheetBL bl = new SheetBL();

                    //string replyStr = string.Empty;
                    //if (String.IsNullOrEmpty(Request.QueryString["chatID"]))
                    //{
                    //    replyStr = bl.GetAPPSheetChatListBYChatID(0, long.Parse(sheetID));
                    //}
                    //else
                    //{
                    //    string chatIDStr = Request.QueryString["chatID"];
                    //    replyStr = bl.GetAPPSheetChatListBYChatID(long.Parse(chatIDStr), long.Parse(sheetID));
                    //}


                    //List<Dictionary<string, object>> json = new List<Dictionary<string, object>>();
                    //JavaScriptSerializer js = new JavaScriptSerializer();
                    //js.MaxJsonLength = int.MaxValue;
                    //json = js.Deserialize<List<Dictionary<string, object>>>(replyStr);
                    //if (json.Count < 1)
                    //{
                    //    //显示已全部加载
                    //    string js_loading = "<script language=javascript>dd.ready(function () {dd.device.notification.toast({ text: '已全部加载...' }); });</script>";
                    //    HttpContext.Current.Response.Write(js_loading);
                    //}
                    //else
                    //{
                    //    hf_chatID.Value = json[json.Count - 1]["ID"].ToString();//保存charID最小值,刷新用
                    //                                                            //for(int i=0;i<json.Count;i++)
                    //    for (int i = json.Count - 1; i > -1; i--)
                    //    {
                    //        HF.Cloud.BLL.Common.Logger.Error("---" + i);
                    //        BLL.Common.Logger.Error("回复类型:" + json[i]["MessageType"].ToString());
                    //        string userName = json[i]["UserName"].ToString();
                    //        string sendTime = json[i]["SendTime"].ToString();
                    //        string sendDetail = json[i]["SendDetail"].ToString();
                    //        if (json[i]["MessageType"].ToString() == "Character")//如果是文字的话
                    //        {
                    //            if (userName == UserName)
                    //            {
                    //                htmlStr.Append("<div style='background-color:#CCFFFF'>" + userName + " - " + sendTime + "</div>");
                    //                htmlStr.Append("<div>" + sendDetail + "</div>");
                    //                htmlStr.Append("<div>---</div>");
                    //            }
                    //            else
                    //            {
                    //                htmlStr.Append("<div>" + userName + " - " + sendTime + "</div>");
                    //                htmlStr.Append("<div>" + sendDetail + "</div>");
                    //                htmlStr.Append("<div>---</div>");
                    //            }
                    //        }
                    //        if (json[i]["MessageType"].ToString() == "PIC")//如果是图片
                    //        {
                    //            if (userName == UserName)
                    //            {
                    //                htmlStr.Append("<div style='background-color:#CCFFFF'>" + userName + " - " + sendTime + "</div>");
                    //                htmlStr.Append("<div>" + sendDetail + "</div>");
                    //                htmlStr.Append("<div>---</div>");
                    //            }
                    //            else
                    //            {
                    //                htmlStr.Append("<div>" + userName + " - " + sendTime + "</div>");
                    //                htmlStr.Append("<div>" + sendDetail + "</div>");
                    //                htmlStr.Append("<div>---</div>");
                    //            }
                    //        }
                    //    }
                    //}
                }
            }
        }