Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BLL.InspectBL inspectBLL = new InspectBL();
                DataTable     dt         = new DataTable();

                try
                {
                    //planType 说明计划是未执行(0)、已完成(1)、正在执行(2)
                    dt = inspectBLL.GetInspectPlanList("2", MainID.ToString(), UserID.ToString(), "0");
                }
                catch (Exception err)
                {
                    HF.Cloud.BLL.Common.Logger.Error("PatrolType.aspx GetInspectPlanList Error", err);
                }

                if (dt != null && dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        htmlstr.Append("<div class=\"sheetType-div\">");
                        htmlstr.Append("<a href=\"PatrolList.aspx?dd_nav_bgcolor=FF5E97F6&patrolID=" + dt.Rows[i]["ID"] + "&clientName=" + dt.Rows[i]["ClientName"] + "&executeDate=" + dt.Rows[i]["ExecuteDate"] + "\">");
                        htmlstr.Append("<div style=\"height:30px;\">");
                        //htmlstr.Append("<label class=\"sheetType-sheetID\"></label>");//样式原因需要保留
                        htmlstr.Append("<label class=\"sheetType-customName\">" + dt.Rows[i]["ClientName"] + "</label>");
                        htmlstr.Append("</div>");
                        htmlstr.Append("<p class=\"sheetType-sheetContent\">执行时间:" + dt.Rows[i]["ExecuteDate"] + "</p>");
                        htmlstr.Append("<p class=\"sheetType-time\">" + dt.Rows[i]["ExecuteUserName"] + "</p>");
                        htmlstr.Append("</a></div >");
                    }
                }
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hf_mainID.Value  = MainID.ToString();
                hf_WriteID.Value = UserID.ToString();
                //绑定设备类型
                BLL.AssetBL assetBLL  = new AssetBL();
                string      assetType = string.Empty;
                try
                {
                    assetType = assetBLL.GetAssetType(MainID);
                }
                catch (Exception err)
                {
                    BLL.Common.Logger.Error("AddRepair Error", err);
                }

                JArray arryassetType = JArray.Parse(assetType);
                for (int i = 0; i < arryassetType.Count; i++)
                {
                    JObject objType = JObject.Parse(arryassetType[i].ToString());
                    ddlAssetType.Items.Add(new ListItem(objType["TypeName"].ToString(), objType["ID"].ToString()));
                }
                ddlAssetType.Items.Insert(0, new ListItem("--请选择--", "-1"));


                //绑定客户名称
                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"));



                //绑定服务商的服务组(比如技术组,商务组)
                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"));
            }
        }
Exemplo n.º 3
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"));
            }
        }
Exemplo n.º 4
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>");
                        }
                    }
                }
                //}
            }
        }
Exemplo n.º 5
0
 private void Form1_Load(object sender, EventArgs e)
 {
     this.textBox1.Text = MainID.GetID().ToString();
 }
Exemplo n.º 6
0
 private void button1_Click(object sender, EventArgs e)
 {
     this.textBox1.Text = MainID.GetID().ToString();
 }
Exemplo n.º 7
0
        public string useTimeStr    = string.Empty; //已耗时
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!String.IsNullOrEmpty(Request.QueryString["RepairID"]))
                {
                    string repairID = Request.QueryString["RepairID"].ToString();
                    repairIDStr = repairID;
                    BLL.Common.Logger.Error("repairID" + repairID);

                    hf_repairID.Value = repairID;
                    hf_mainID.Value   = MainID.ToString();
                    hf_sendID.Value   = UserID.ToString();
                    hf_sendTime.Value = DateTime.Now.ToString();

                    //获取当前维修单信息
                    BLL.RepairTaskBLL repairBLL = new BLL.RepairTaskBLL();
                    List <Dictionary <string, object> > json = new List <Dictionary <string, object> >();

                    try
                    {
                        json = repairBLL.GetTaskDetails(long.Parse(repairID));
                    }
                    catch (Exception err)
                    {
                        BLL.Common.Logger.Error("RepairReply  Error", err);
                    }
                    BLL.Common.Logger.Error("json.Count:" + json.Count);
                    if (json.Count > 0)
                    {
                        typeNameStr   = json[0]["TypeName"].ToString();
                        taskStatusStr = json[0]["taskStatus"].ToString();

                        realseNameStr = json[0]["realseName"].ToString();
                        writeTimeStr  = json[0]["WriteTime"].ToString();
                        useTimeStr    = json[0]["UseTime"].ToString();
                    }

                    //获取回复列表
                    BLL.RepairTaskBLL repairTask = new BLL.RepairTaskBLL();
                    string            replyStr   = "";
                    try
                    {
                        //获取回复消息
                        replyStr = repairTask.GetAPPSheetChatListBYChatID(0, long.Parse(repairID), 2);
                        BLL.Common.Logger.Error("RepairReply回复消息:" + replyStr);
                    }
                    catch (Exception err)
                    {
                        BLL.Common.Logger.Error("RepairReply Error", err);
                    }

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


                    hf_chatID.Value   = json_Reply[json_Reply.Count - 1]["ID"].ToString(); //保存charID最小值,刷新用
                    hf_userName.Value = UserName;                                          //当前用户名字
                    for (int i = json_Reply.Count - 1; i > -1; i--)
                    {
                        //HF.Cloud.BLL.Common.Logger.Error("---" + i);
                        //BLL.Common.Logger.Error("回复类型:" + json[i]["MessageType"].ToString());
                        string userName   = json_Reply[i]["UserName"].ToString();
                        string sendTime   = json_Reply[i]["SendTime"].ToString();
                        string sendDetail = json_Reply[i]["SendDetail"].ToString();
                        if (json_Reply[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_Reply[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>");
                            }
                        }
                    }
                }
            }
        }