收藏

 

<script type="text/javascript"  language="javascript">
        function OpenDeptDialog(wLen,hLen)
        {
            //初始化变量,用于接收页面反回值。
            var recdata="";
            var deptName=document.getElementById('txtDeptName').value ;
            var stringArray;

            recdata=showModalDialog("BaseInfo/CommonFindJDEDept.aspx?deptName="+deptName,window,"dialogWidth:"+wLen+"px;dialogHeight:"+hLen+"px;center:1;scroll:1;help:0;status:0");

            //判断对应的返回值
            if (recdata != null && recdata.indexOf("undefined") == -1)    
            {                  
                stringArray = recdata.split("$"); 
               
                document.getElementById('txtDeptCode').value=stringArray[0];     
                document.getElementById('txtDeptName').value=stringArray[1]; 
            }
        }
       
      function OpenDrugDialog(wLen,hLen)
      {
          //初始化变量,用于接收页面反回值。
            var recdata="";
           
            var drugName = document.getElementById('txtDrugName').value;
           
            var stringArray;
              
            recdata=showModalDialog("BaseInfo/CommonFindJDEDrug.aspx?drugName="+drugName,window,"dialogWidth:"+wLen+"px;dialogHeight:"+hLen+"px;center:1;scroll:1;help:0;status:0");

            //判断对应的返回值
            if (recdata != null && recdata.indexOf("undefined")==-1)    
            {
                stringArray = recdata.split("$"); 
         
                document.getElementById('txtDrugCode').value=stringArray[0];        //医材编码
                document.getElementById('txtDrugName').value=stringArray[1];        //医材名称 ;
            }
      }
       
       function isnum()
        {
            if(event.keyCode<45 || event.keyCode>57)
            {
                event.keyCode=0;
            }
       
        }
    </script>
</head>
<body>
    <form id="form2" runat="server" style="font-size:10pt;text-align:center">
    <div  style=" text-align:center">
         
          <table cellpadding="0" cellspacing="0" width="100%" style="text-align:center;">  
               <tr>
                 <th  style="font-size:12pt">收货入库</th>
               
               </tr>
               <tr>
                   <td>
                        <table cellpadding="0" cellspacing="0" width="100%" style="text-align:left">
                           <tr>                                                          
                               <td>
                                   <asp:Label ID="Label1" runat="server" Text="订单编号"></asp:Label>
                               </td>
                               <td>
                                   <asp:TextBox ID="txtOrderCode" runat="server" Width="121px" ></asp:TextBox>
                               </td>                              
                               <td>
                                   <asp:Label ID="Label6" runat="server" Text="科室名称"></asp:Label>
                               </td>
                               <td>
                                   <asp:TextBox ID="txtDeptName" runat="server" Width="121px" ></asp:TextBox>
                                   <input type="button" id="btnDept" οnclick="OpenDeptDialog(640,400)" value="选择"/>
                               </td>
                           
                               <td>
                                   <asp:Label ID="Label9" runat="server" Text="医材名称"></asp:Label>
                               </td>
                               <td>
                                   <asp:TextBox ID="txtDrugName" runat="server" Width="121px" ></asp:TextBox>
                                   <input type="button" id="btnDrug" οnclick="OpenDrugDialog(640,400)" value="选择"/>
                               </td>
                           </tr>                            
                           <tr>
                           <td><asp:TextBox ID="txtDeptCode" runat="server" CssClass="hidden"></asp:TextBox></td>
                           <td><asp:TextBox ID="txtDrugCode" runat="server" CssClass="hidden"></asp:TextBox></td>
                           </tr> 
                           <tr>
                               <td colspan="8" align="center">
                                  <asp:Button ID="btnSearch" runat="server" Text="查  询" OnClick="btnSearch_Click" />
                                  <asp:Button ID="btnSave" runat="server" Text="单页保存" OnClick="btnSave_Click" />
                                   <asp:Button ID="SaveAll" runat="server" Text="全部保存" οnclick="SaveAll_Click" />
                                  <asp:Button ID="btnReset" runat="server" Text="重  置" OnClick="btnReset_Click" />
                               </td>
                           </tr>              
                         
                        </table>
                   </td>
               </tr>
               <tr style=" vertical-align:top">
                  <td style="height: 291px">
                    
                      <asp:GridView ID="gvList" runat="server" Width="100%" CellPadding="4" 
                          Font-Size="9pt" ForeColor="#333333"
                                    GridLines="None" AutoGenerateColumns="False" AllowPaging="True"
                          OnPageIndexChanging="gvList_PageIndexChanging" BorderColor="Red">
                          <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                          <RowStyle BackColor="#EFF3FB" />
                          <EditRowStyle BackColor="#2461BF" />
                          <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                          <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                          <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                          <AlternatingRowStyle BackColor="White" />
                          <Columns>
                              <asp:BoundField DataField="Buy_Order_Code" HeaderText="订单编号" />
                              <asp:BoundField DataField="Dept_Code" HeaderText="科室编号" />
                              <asp:BoundField DataField="Dept_Name" HeaderText="科室名称" />
                              <asp:BoundField DataField="Goods_Code" HeaderText="医材编号" />
                              <asp:BoundField DataField="Goods_Name" HeaderText="医材名称" />
                              <asp:BoundField DataField="Goods_Specification" HeaderText="规格" />
                              <asp:BoundField DataField="Goods_PackUnit" HeaderText="单位" />
                              <asp:BoundField DataField="Buy_Price" HeaderText="价格">
                                  <ItemStyle CssClass="hidden" />
                                  <HeaderStyle CssClass="hidden" />
                                  <FooterStyle CssClass="hidden" />
                              </asp:BoundField>
                              <asp:BoundField DataField="Buy_Count" HeaderText="订单数量" />
                             
                              <asp:TemplateField HeaderText="到货数量">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txtArrive_Count" runat="server" Width="65px"></asp:TextBox>
                                    </ItemTemplate>
                              </asp:TemplateField>                             
                              <asp:BoundField DataField="Fact_Count" HeaderText="已到货数量" />
                              <asp:TemplateField HeaderText="出库单号">
                                    <ItemTemplate>
                                        <asp:TextBox ID="Sell_Order_Code" runat="server" Width="65px" ></asp:TextBox>
                                    </ItemTemplate>
                              </asp:TemplateField>
                              <asp:BoundField DataField="Buy_Order_Line" HeaderText="行数" >
                                  <ItemStyle CssClass="hidden" />
                                  <HeaderStyle CssClass="hidden" />
                                  <FooterStyle CssClass="hidden" />
                              </asp:BoundField>
                              <asp:BoundField DataField="Order_Date" HeaderText="订单日期" />
                          </Columns>
                      </asp:GridView>
                  </td>
               </tr>
               <tr>
                  <td>
                     <asp:Label ID="lbInfo" runat="server"></asp:Label>
                  </td>
               </tr>
          </table>
         
    </div>
    </form>
</body>

/

 if (Request.QueryString["deptName"] !=null)
            deptName = Request.QueryString["deptName"];
        if (!IsPostBack)
        {
            string type = "";
            if (Request.QueryString["type"] != null)
            {
                type = Request.QueryString["type"];
                this.Title = "HIS系统科室信息";
            }
            ViewState["type"] = type;
            GvDataBound("", deptName, type);
        }

///

 protected void gvList_SelectedIndexChanged(object sender, EventArgs e)
    {
        //string supplierCode=this.gvList.SelectedValue as string;
        GridViewRow row = this.gvList.SelectedRow;
        string deptId = "", deptName = "";
        deptId = row.Cells[1].Text.Trim();
        deptName = row.Cells[2].Text.Trim();

        string returnValue = deptId + "$" + deptName;

        if (!ClientScript.IsClientScriptBlockRegistered("aa"))
        {
            String myScript = @"window.returnValue='" + returnValue + "';window.close();";
            Page.ClientScript.RegisterStartupScript(this.GetType(), "MyScript", myScript, true);
        }

        //this.lbInfo.Text = "<script>alert('选中了" + supplier.Suppliers + "')</script>";
    }

 DataTable table = new DataTable();
        table.Columns.Add("ID");
        table.Columns.Add("Dept_Code");
        table.Columns.Add("Dept_Name");
        table.Columns.Add("Principal");
        table.Columns.Add("Phone");
        table.Columns.Add("Remark");

        DataRow row = table.NewRow();
        row["ID"]=1;
        row["Dept_Code"]="A909";
        row["Dept_Name"]="JDE测试科室1";
        row["Principal"]="fdsfdsf";
        row["Phone"] = "fdssa";
        row["Remark"]="dfdsaf";
        table.Rows.Add(row);

        row = table.NewRow();
        row["ID"] = 1;
        row["Dept_Code"] = "A909";
        row["Dept_Name"] = "JDE测试科室1";
        row["Principal"] = "fdsfdsf";
        row["Phone"] = "fdssa";
        row["Remark"] = "dfdsaf";
        table.Rows.Add(row);

        this.gvList.DataSource = table;
        this.gvList.DataBind();

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值