<%@ page language="C#" autoeventwireup="true" inherits="Admin_ProjectVerify, 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" OnRowCommand="TableView_RowCommand">
             <Columns>
                 <asp:TemplateField HeaderText="审核" SortExpression="EID">
                     <ItemTemplate>
                     <asp:Button ID="btnComplete" runat="server" Text="确定完成" CssClass="btn"  OnClientClick="if(confirm('你确定该项目已完成？')){return true;}else{return false;}" CommandArgument='<%#Eval("CID") %>' CommandName="complete"  />
                     <input id="Button1" class="btn" type="button" value="功能列表" onclick="showFunPanel('<%#Eval("CID") %>')" />
                     </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="SumPayment" HeaderText="已付款" DataFormatString="{0:c}" >
                  <ItemStyle Wrap="False"  ForeColor="Maroon" Font-Bold="True" />
                    <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" >
                <ItemStyle Wrap="False" />
                <HeaderStyle  Wrap="False" />
                 </asp:BoundField>
                <asp:BoundField DataField="endDate" HeaderText="—" SortExpression="endDate" >
                <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>
    
         <div id="EditPanel" class="popupPanel" style="height:288px; left: 202px; top: 496px;">
            <table border="0" cellspacing="5"  width="100%">
                <tr>
                    <td colspan="3" style="height: 33px">
                        <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="关闭" />
                        </div>
                    </td>
                </tr>
                <tr>
                    <td colspan="3" style="height: 211px" valign="top">
                    <div id="FunctionList" style="overflow:scroll; width: 490px; height:210px" >
                    
                    </div>
                    </td>
                </tr>
                <tr>
                    <td align="center" colspan="3" valign="top">
                        <input id="btnNewFunction" class="btn" type="button" value="新增功能需求"  onclick="newFunction(currentPid)"/></td>
                </tr>
            </table>
        </div>
        </form>
    <script>
   function showFunPanel(cid){
    $.ajax({
           type: "POST",
           dataType:"text",
           processData:false,
           async:false,
           url: "ashx/FunctionList.ashx",
           data: "cid="+cid,
           success: function(msg){
              $("#FunctionList").html(msg);
               showPanel($("#EditPanel"));
           },
           error:function (XMLHttpRequest, textStatus, errorThrown) { 
            alert("加载功能需求列表失败 "+textStatus +" "+errorThrown+" "+XMLHttpRequest);
           }
        }); 
   
    }
function DetailsProgress(cid){
           location.href='FunctionProgress.aspx?cid='+cid+'&where=&pageindex=<%= PagerButtom.CurrentPageIndex %>&s=v';
     }
     function showFunction(cid){
        location.href='FuntionLook.aspx?cid='+cid+'&where=&pageindex=<%= PagerButtom.CurrentPageIndex %>&s=v';
     }
     function editFunction(cid){
        location.href='FunctionEdit.aspx?cid='+cid+'&where=&pageindex=<%= PagerButtom.CurrentPageIndex %>&s=v';
     }
     function FunctionCode(cid){
        location.href='FunctionCodeList.aspx?cid='+cid+'&where=&pageindex=<%= PagerButtom.CurrentPageIndex %>&s=v';
     }
    </script>
</body>
</html>