<%@ page language="C#" autoeventwireup="true" inherits="Admin_ProjectNotComplete, App_Web_qxuvifui" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>项目列表</title>
    <link href="../CSS/All.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/pager.css" rel="stylesheet" type="text/css" />
    <script src="../JS/jquery.min.js" type="text/javascript"></script>
    <script src="../JS/Popup.js" type="text/javascript"></script>
    <style>
    .popupPanel{
        z-index: 101;
        left: 200px;  width: 500px; 
        position: absolute;
        top: 190px; 
        height: 63px; 
        display:none;
        background-color: whitesmoke; 
        border-right: #5d7b9d 10px solid;
        border-top: #5d7b9d 10px solid; 
        border-left: #5d7b9d 10px solid; 
        border-bottom: #5d7b9d 10px solid;
    }
     .close{
        border-right: medium none;
        border-top: medium none; float: right; border-left: medium none; border-bottom: medium none;
        background-color: darkgray
    }
    </style>
</head>
<body>
    <form id="Myform" runat="server" style="font-weight: normal;">
        <div class="title" >
            未完成项目</div>
        <div >
            <br />
            &nbsp;</div>    
        <fieldset>
        <legend>完成项目列表</legend>
        <div  id="view" style="overflow-x:auto; padding-left:3px;height:450px;">
        <asp:GridView
            ID="TableView" runat="server" AutoGenerateColumns="False"
             EmptyDataText="没有可显示的数据记录。" Width="100%" BorderStyle="Solid" DataKeyNames="CID">
             <Columns>
                 <asp:TemplateField HeaderText="查看" SortExpression="EID">
                     <ItemTemplate>
                     <input id="btnProgress" type="button"  class="btn"  value="功能列表 " onclick='showFunPanel("<%#Eval("CID") %>","<%#Eval("PName") %>");'/>
                     <input id="btnEmp" type="button"  class="btn"  value="开发人员 " onclick='Programmer("<%#Eval("CID") %>","<%#Eval("PName") %>");'/>
                     </ItemTemplate>
                     <HeaderStyle Height="30px"  Wrap="False"  />
                     <ItemStyle Height="30px"   Wrap="False" />
                 </asp:TemplateField>
                <asp:BoundField DataField="PName" HeaderText="项目名" SortExpression="PName" >
                <ItemStyle Wrap="False" />
                <HeaderStyle  Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="PClass" HeaderText="商品类型" SortExpression="PClass" >
                <ItemStyle Wrap="False" />
                <HeaderStyle  Wrap="False" />
                 </asp:BoundField>
                <asp:BoundField DataField="Amount" HeaderText="金额" SortExpression="Amount" DataFormatString="{0:C}" >
                <ItemStyle Wrap="False" />
                <HeaderStyle  Wrap="False" />
                 </asp:BoundField>
                <asp:BoundField DataField="CustID" HeaderText="对应客户" SortExpression="CustID" >
                <ItemStyle Wrap="False" />
                <HeaderStyle  Wrap="False" />
                 </asp:BoundField>
                <asp:BoundField DataField="beginDate" HeaderText="开发周期" SortExpression="beginDate" DataFormatString="{0:yyyy-MM-dd}" >
                <ItemStyle Wrap="False" />
                <HeaderStyle  Wrap="False" />
                 </asp:BoundField>
                <asp:BoundField DataField="endDate" HeaderText="—" SortExpression="endDate" DataFormatString="{0:yyyy-MM-dd}" >
                <ItemStyle Wrap="False" />
                <HeaderStyle  Wrap="False" />
                 </asp:BoundField>
                <asp:BoundField DataField="RebateBudget" HeaderText="回扣预算" SortExpression="RebateBudget" DataFormatString="{0:C}" >
                <ItemStyle Wrap="False" />
                <HeaderStyle  Wrap="False" />
                 </asp:BoundField>
                </Columns>
                  <FooterStyle CssClass="GridViewFooterStyle" />
                 <RowStyle CssClass="GridViewRowStyle" />   
                 <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
                 <PagerStyle CssClass="GridViewPagerStyle" />
                 <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                 <HeaderStyle CssClass="GridViewHeaderStyle" />
                 
        </asp:GridView>
        </div>
        <hr/> 
      </fieldset>
    <webdiyer:aspnetpager id="PagerButtom" runat="server" alwaysshow="True" cssclass="paginator"
                currentpagebuttonclass="cpb" custominfohtml="当前第%CurrentPageIndex%/%PageCount%页 共%RecordCount%条记录 每页%PageSize%条 "
                firstpagetext="首页" lastpagetext="尾页" layouttype="Table" nextpagetext="下一页" numericbuttoncount="5"
                onpagechanged="Pager_PageChanged" pagesize="25" prevpagetext="上一页" showcustominfosection="Left"
                showpageindexbox="Always"></webdiyer:aspnetpager>
      
        </form>
        
<div id="EditPanel" class="popupPanel" style="height:302px; left: 200px;  top: 190px;">
            <table border="0" cellspacing="5"  width="100%" >
                <tr>
                    <td colspan="3" style="height: 42px" valign="top" >
                        <div id="_addCoursePanelDorp" style="width: 100%; border-bottom: gray 1px solid;
                            height: 25px; background-color: whitesmoke; ">
                            <input id="btnAddCourseClose" class="close" onclick='$("#EditPanel").hide();' type="button"
                                value="关闭" />项目名：<span id="projectName" style="width:300px; overflow:hidden"></span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="3" valign="top" style="height: 222px">
                        <div id="ContentList" style="overflow: scroll; width: 490px; height: 220px;">
                        
                        </div>
                    </td>
                </tr>
            </table>
</div>
   <script>
function showFunPanel(cid,pname){
    $.ajax({
           type: "POST",
           dataType:"text",
           processData:false,
           async:false,
           url: "ashx/FunctionList.ashx",
           data: "cid="+cid,
           success: function(msg){
              $("#ContentList").html(msg);
                showPanel($("#EditPanel"));
                $("#projectName").text(pname);
           },
           error:function (XMLHttpRequest, textStatus, errorThrown) { 
            alert("加载功能需求列表失败 "+textStatus +" "+errorThrown+" "+XMLHttpRequest);
           }
        }); 
}
function Programmer(cid,pname){
  $.ajax({
           type: "POST",
           dataType:"text",
           processData:false,
           async:false,
           url: "ashx/Programmer.ashx",
           data: "cid="+cid,
           success: function(msg){
              $("#ContentList").html(msg);
                showPanel($("#EditPanel"));
                $("#projectName").text(pname);
           },
           error:function (XMLHttpRequest, textStatus, errorThrown) { 
            alert("加载功能需求列表失败 "+textStatus +" "+errorThrown+" "+XMLHttpRequest);
           }
        }); 
}
    
     function DetailsProgress(cid){
           location.href='FunctionProgress.aspx?cid='+cid+'&where=&pageindex=<%= PagerButtom.CurrentPageIndex %>&s=nc';
     }
     function showFunction(cid){
        location.href='FuntionLook.aspx?cid='+cid+'&where=&pageindex=<%= PagerButtom.CurrentPageIndex %>&s=nc';
     }
     function editFunction(cid){
        location.href='FunctionEdit.aspx?cid='+cid+'&where=&pageindex=<%= PagerButtom.CurrentPageIndex %>&s=nc';
     }
     function FunctionCode(cid){
        location.href='FunctionCodeList.aspx?cid='+cid+'&where=&pageindex=<%= PagerButtom.CurrentPageIndex %>&s=nc';
     }
    </script>
</body>
</html>