<%@ Page Title="" Language="C#" MasterPageFile="~/helpdesk/helpdesk.master" AutoEventWireup="true" CodeBehind="Ticket_view.aspx.cs" Inherits="helpdesk.helpdesk.Ticket_view" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <asp:ScriptManager ID="ScriptManager1"    runat="server"></asp:ScriptManager>

    
    <div class="alert alert-danger" style="margin:10px;">
        <asp:Label runat="server" ID="lbl_note" ForeColor="Red" Text=""></asp:Label>
    </div>


<table width="100%">
<tr valign="top">




<td valign="top"  >
<!-- left start -->

     


 <!--buttons toolbar-->
 
        <div class="well" style="margin:10px;">

            <div class="pull-left">
                   <asp:HiddenField runat="server" ID="hf_isclose" Value="0" />
         
                  <asp:Button ID="btnclose" runat="server" Text="关闭问题" CssClass="btn btn-sm btn-primary btn-flat"    
             onclick="btnclose_Click" />



                <asp:Button   runat="server" ID="btndelete" Text="删除"    
            OnClientClick="return confirm('您确定要删除该问题吗?');"   
            title="删除问题"  CssClass="btn btn-danger btn-sm btn-flat" 
            onclick="btndelete_Click" />


                 

               <asp:Button ID="btnsolvedclose" runat="server" Text="已解决并关闭" 
                    CssClass="btn btn-sm btn-flat bg-green"   
            onclick="btnsolvedclose_Click"   />
            </div>
          
            

             

            <div class="pull-right">


      <input type="button"  class="btn btn-flat btn-sm bg-maroon"   value="返回" onclick="window.location = 'ticket_my.aspx'" />
            
           
        <asp:Button   ID="btnedit" runat="server" Text="编辑" 
            class="btn btn-flat btn-sm  btn-info"
            onclick="edit_Click" />
    

            </div>
       

            <div class="clearfix"></div>

        </div>
        
 


<!-- Tick Info -->


    <!-- ticket subj and body-->    
    
    <div style=" background-color:#ffffff;  padding:20px; margin:10px;">
  
  <h3>
        <asp:Label ID="lbl_title" runat="server" Text="" Visible="true"></asp:Label> 
  </h3>
    
    <div style=" color:Green; margin:5px;"> 
       <asp:Label runat="server"  id="lbl_contactname"></asp:Label>  &nbsp;&nbsp;
       <asp:Label runat="server"   id="lbl_contactdept"></asp:Label>&nbsp;&nbsp;
       <asp:Label runat="server"  id="lbl_contactemail"></asp:Label>  &nbsp;&nbsp;
       <asp:Label runat="server"  id="lbl_contacttel"></asp:Label>&nbsp;&nbsp;
     </div>
 
 <div style="  color:#0099cc; background:#ffffff; margin:10px; padding:10px;">
     <asp:Label  ID="lbl_contents" runat="server"  Visible="true"></asp:Label> 
 </div>

  
    
   
   
   
    
   

  <table class="table"  >
	    <tr>
            <th colspan="5">
            处理日志  (最新处理在上)
         </th>
	   </tr>
	    
	    
	    
	    <tr>
            <td> &nbsp;&nbsp;&nbsp;&nbsp; </td>
	       <td width="97%">
	    
	     

     <div style="color:gray; margin:2px;">您可以对问题进行补充或者处理。</div>
            <div runat="server" id="txtNewComment" 
                 class="form-control"  style="width:800px; height:90px" >
            </div>
    
   

	<script type="text/javascript">
	    tinymce.init({
	        selector: "#<%=txtNewComment.ClientID%>",
	        menubar: false,
	        plugins: ["textcolor colorpicker table"
             ],
	        width: 800,
	        height:90,
	        inline: false,
	        toolbar1: " bold ,italic,underline,strikethrough,|,fontsizeselect,forecolor,backcolor,|,cut,copy,paste,|,undo,redo,|,link,unlink,image,myuploads,|,table,code | attach pic",

	        setup: function (editor) {
	            editor.addButton('attach', {
	                text: '上传附件',
	                icon: false,
	                onclick: function () {
	                    window.open('../SimlpeUploadFile.aspx', 'null', 'left=250px,top=200px,width=500px,height=300px'); return false;
	                }
	            });


	            editor.addButton('pic', {
	                text: '插入图片',
	                icon: false,
	                onclick: function () {
	                    window.open('../SimlpeUploadFile.aspx?t=insertimg', 'null', 'left=250px,top=200px,width=500px,height=300px'); return false;
	                }
	            });
	        }
	    });
</script>





<br />




<div class=" text-center">

 <asp:Button ID="btnreply" runat="server"  Text="回复或者补充"  class="btn  btn-primary " 
                onclick="Button1_Click" />
    </div>
</td> 
        <td>
 
  </td>
      </tr>    
            
       
       
       
      <!--  reply list -->
 



<tr>
    
    <td colspan="5">

        <!--comments list-->
        <asp:repeater id="rpt_reply" EnableViewState="false" runat="server" >
	        <ItemTemplate>
	         
	      <table style="width:840px;"  > 
                <tr valign="top">
                      <td> &nbsp;&nbsp;&nbsp;&nbsp; </td>
                    <td  width="6%" style=" border-left:1px solid #cccccc;border-top:1px solid #cccccc;border-bottom:1px solid #cccccc; padding:8px;">
                        <%# ((DateTime)Eval("replydate")).ToString("HH:mm")%>
                    </td>
                    <td width="94%" style="border-right:1px solid #cccccc;border-top:1px solid #cccccc;border-bottom:1px solid #cccccc; padding:8px;"  >
                      <b><%#Eval("replyuser") %></b>
                         
                       
                        <div>
                         <%# Eval("contents") %>
                         <br />
                        
                        <div style=" font-size:11px; text-align:right; color:Gray">
                         <%#Eval("replyuser")%> , <%#Eval("userrole") %> ,  <%# ((DateTime)Eval("replydate")).ToString("yyyy-MM-dd HH:mm")%>
                        </div>
                        </div>
                    </td>
                 </tr>
                  <tr><td style="padding:0px 0px 0px 0px;height:7px" colspan="4"></td></tr>
	        </table>
	          
	            
	        </ItemTemplate>
        </asp:repeater>
       
       
       </td>


</tr>

 </table>
     
      </div>
              



<!-- /left end -->

</td>
 
      


<td valign="top" style="background-color:#f0f0f0"  width="330px">


<!-- ticket detail -->
   <table class="table">
	<tr>
		<th colspan="2">问题信息</th>
	</tr>
	  
		     
	<tr>
        <td align="right" style="width:30%">类别:</td>

		<td style="width:70%"> 
	            
            <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
                <ContentTemplate>


	            <asp:Panel runat="server" ID="pnl_normal">
	            


			     <asp:Label runat="server" ID="lbl_category1"></asp:Label>/
			     <asp:Label runat="server" ID="lbl_category2"></asp:Label>/
			       <asp:Label runat="server" ID="lbl_category3"></asp:Label>
			     <asp:Button runat="server" ID="btnchangecat"  class="btn btn-flat  bg-green btn-xs"  Text="修改" 
                        onclick="btnchangecat_Click" />
                        
                </asp:Panel>
                
                <asp:Panel runat="server" ID="pnl_edit">
                
                
  <asp:DropDownList ID="ddl_category1" runat="server" Width="200" 
      CssClass="form-control" 
        AutoPostBack="True" onselectedindexchanged="ddl_category1_SelectedIndexChanged">
    
    </asp:DropDownList>

   <asp:DropDownList ID="ddl_category2" runat="server"  Width="200" 
          AutoPostBack="True"     CssClass="form-control"            onselectedindexchanged="ddl_category2_SelectedIndexChanged"    >
       
 
    </asp:DropDownList>
                     
       <asp:DropDownList ID="ddl_category3" runat="server"  Width="200"  CssClass="form-control"   >
       
 
    </asp:DropDownList>
    
    
              <asp:Button runat="server" ID="btn_save" class="btn btn-flat  bg-green btn-xs"  Text="保存" 
                        onclick="btn_save_Click" />    
                </asp:Panel>
                 
                </ContentTemplate>

            </asp:UpdatePanel>
      
                        
            </td>
        </tr>         
                        
                        
                        
                
	        
	        
	        <tr>
		        <td align="right">
			       建立者: 
			    </td><td> 
                    <asp:HyperLink ID="hl_username" runat="server"></asp:HyperLink>
			       </td>
		    </tr>
		    
		    
		    
		    
		    
	        <tr>
		        <td align="right">
			        优先级: 
			    </td><td>

                     <asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="server">
                <ContentTemplate>
			     
			        <asp:DropDownList ID="ddl_priority" AutoPostBack="true" CssClass="form-control "
                            runat="server" onselectedindexchanged="ddl_priority_SelectedIndexChanged">
                        </asp:DropDownList>
            
                    </ContentTemplate>
                         </asp:UpdatePanel>
                     
		        </td>
	        </tr>
	        <tr>
		        <td align="right">
		          建立时间: 
		        </td><td>
			        <span  class="f11" >
			        <asp:Label runat="server" ID="lbl_createdate"></asp:Label>
			        </span>
		        </td>
	        </tr>
	        
              <tr>
		        <td align="right">
		         状态: 
		        </td><td>
			    
                      <asp:UpdatePanel ID="UpdatePanel3" UpdateMode="Conditional" runat="server">
                <ContentTemplate>
			        <asp:DropDownList ID="ddl_status" AutoPostBack="true"  CssClass="form-control" 
                        runat="server" onselectedindexchanged="ddl_status_SelectedIndexChanged">
                      </asp:DropDownList>
                          </ContentTemplate>
                          </asp:UpdatePanel>  
              
             
			        
			        
			        
			        
		        </td>
		    </tr>
	        <tr>
		        <td  align="right">
		          问题 ID: 
		        </td><td>
			        <asp:label ID="lbl_id" runat="server" ></asp:label>
			        </td>
	        </tr>




               <tr>
		        <td  align="right">
		          解决方式: 
		        </td><td>

                              <asp:UpdatePanel ID="UpdatePanel4" UpdateMode="Conditional" runat="server">
                <ContentTemplate>
			       <asp:DropDownList runat="server" ID="ddl_method"  CssClass="form-control"  AutoPostBack="true"  
                        onselectedindexchanged="ddl_method_SelectedIndexChanged" >
                   <asp:ListItem Text="helpdesk系统支持"></asp:ListItem>
                    <asp:ListItem Text="电话支持"></asp:ListItem>
                     <asp:ListItem Text="邮件支持"></asp:ListItem>
                      <asp:ListItem Text="远程桌面"></asp:ListItem>
                       <asp:ListItem Text="现场支持"></asp:ListItem>
                         <asp:ListItem Text="其它方式"></asp:ListItem>
                   </asp:DropDownList>
                    </ContentTemplate>
                                  </asp:UpdatePanel>


			        </td>
	        </tr>

	        













            <tr runat="server" id="tr_count1">
		        <td align="right">
                      计时状态:
		            <br /><br /><br />                    
                    已经用时: 
                    
		        </td>
		        
		        <td>
		              
             <asp:PlaceHolder runat="server" ID="pl_1">

                  <input type="button" id="btn_start" class="btn btn-flat bg-green" value="计时开始"  onclick="startcount();" />
       
             </asp:PlaceHolder>
       

                    <asp:PlaceHolder runat="server" ID="pl_2">

                         <input type="button"  disabled="disabled" value="计时运行中"  class="btn bg-green btn-flat"   /> 

                    </asp:PlaceHolder>
        <br /><br />

        <asp:TextBox  runat="server" id="txt_hour"    ClientIDMode="Static"  class="form-control"  style="width:90px; display:inline-block; background-color:#cccccc" /> (分:秒)
        <br /><br />
                      

                     <script>

                         clock = $("#txt_hour");
                         c =  <%=cc%>  ;
                       
                         clock.val( (c / 60 )+ ":" + "00");
                         

                         function startcount() {
                             $("#btn_start").val("计时运行中").prop("disabled",true); 
                             $.get("ajax/ajax_count.aspx?t=init&id=<%=id%>&r"+Math.random());
                              timer1 = setInterval("timer()", 1000);
                         }
                            


                         function timer() {

                             min = Math.floor(c / 60);
                             if (min < 10) {
                                 min = "0" + min;
                             }

                             sec = c - min * 60;

                             if (sec < 10) {
                                 sec = "0" + sec;
                             }
                             clock.val(min + ":" + sec);
                             c = c + 1;
                         }



		     </script>

<asp:PlaceHolder runat="server" ID="pl_3" Visible="false">

    <script>
        timer1 = setInterval("timer()", 1000);

    </script>
     
</asp:PlaceHolder>


		        </td>
	        </tr>




 

 












       
	        <tr  >
	            <td align="right">
			        实际用时: 
			    </td> 
                <td> 
   <asp:TextBox  runat="server" id="txt_hours3"    ClientIDMode="Static"  class="form-control"  style="width:60px; display:inline-block;  " />
                 (小时) 

                    <asp:Button runat="server" ID="btnok3" UseSubmitBehavior="false"  Text="保存" OnClientClick="save(); return false;"    Class="btn btn-flat  btn-sm  bg-green" />
                     
			           
                <script>
                    function save() {
                        $.get("ajax/ajax_count.aspx?v=" + $("#txt_hours3").val() + "&t=save&id=<%=id%>&r=" + Math.random());
                        layer.msg("操作成功");
                        return false;
                    }

                </script>
 
		        </td>
		    </tr>
	        
	       

         



 
	        <tr>
	            <td align="right">
			        最后回复: 
			    </td><td class="f11">
			           <asp:Label runat="server" ID="lb_lastreply"></asp:Label> 
		        </td>
		    </tr>
	        <tr>
		        <td align="right">
		            关闭时间: 
		        </td><td class="f11">
			       <asp:Label runat="server" ID="lbl_close"></asp:Label>
		        </td>
	        </tr>
	        
	        
	        
	        
	        
	        
	        <tr>
		        <th  colspan="2">
		        机器信息 
		        </th>
		     </tr>
	        
	        
	        
	        
	         
	         <tr>
		        <td align="right">
		          机器名: 
		        </td><td>
                    <asp:Label  runat="server" id="lbl_pcname"></asp:Label>
		        </td>
	          </tr>
	          
	          
	          
	          
	              
	         <tr>
		        <td align="right">
		       主板号: 
		        </td><td>
                    <asp:Label  runat="server" id="lbl_mainboardserialno"></asp:Label>
		        </td>
	          </tr>
	          
	              
	         <tr>
		        <td align="right">
		         制造商: 
		        </td><td>
                    <asp:Label  runat="server" id="lbl_mainboardmanufacturer"></asp:Label>
		        </td>
	          </tr>
	          
	          
	          
	        
	           <tr>
		        <td align="right">
		       资材编号: 
		        </td><td>
                    <asp:Label   runat="server" id="lbl_assettag"></asp:Label>
		        </td>
	        </tr>
	        
	        
	           <tr>
		        <td align="right">
		       序列号: 
		        </td><td>
                    <asp:Label  runat="server" id="lbl_serial"></asp:Label>
		        </td>
	          </tr>
	        
	        
	       
	        
	           <tr>
		        <td align="right">
		  IP地址: 
		        </td><td>
                    <asp:Label  runat="server" id="lbl_ip"></asp:Label>
		        </td>
	          </tr>
	        
	          <tr>
		        <td align="right">
		         操作系统: 
		        </td><td>
                    <asp:Label  runat="server" id="lbl_os"></asp:Label>
		        </td>
	          </tr>
	          
	         <tr>
		        <td align="right">
		       浏览器: 
		        </td><td>
                    <asp:Label  runat="server" id="lbl_ie"></asp:Label>
		        </td>
	          </tr>
	          
	          
	          
	           
	         <tr>
		        <td align="right">
		        32位系统: 
		        </td><td>
                    <asp:Label  runat="server" id="lbl_bit32"></asp:Label>
		        </td>
	          </tr>
	        
	        
	        </table>
	    </td>
	</tr>
</table>


 
   

</asp:Content>
