| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1419 人关注过本帖
标题:在线等高手进来看看
取消只看楼主 加入收藏
zhouwei
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2008-4-1
收藏
 问题点数:0 回复次数:6 
在线等高手进来看看
我有一个页面index.aspx
里面有一个image弹出一个模式对话框window.showModalDialog('BillInfoManage/AddNewBill.aspx?RestID='+value+'','','dialogHeight:350px; dialogWidth:635px; status:no; help:no; scroll:yes;');
但是弹出来得模式对话框不能与后台进行交互,请问如何解决。。。。
搜索更多相关主题的帖子: 在线 
2008-05-19 11:23
zhouwei
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2008-4-1
收藏
得分:0 
回复 2# 的帖子
模式对话框里面可以和后台代码交互
2008-05-19 11:26
zhouwei
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2008-4-1
收藏
得分:0 
回复 4# 的帖子
例如我得模式框里面有个得button控件,我单击修改数据库没反应
我就是想单击它调用后台代码,模式框不知道整么回事  不能实现
2008-05-19 11:33
zhouwei
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2008-4-1
收藏
得分:0 
速度啊 高手门  考验来了
2008-05-19 11:38
zhouwei
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2008-4-1
收藏
得分:0 
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddNewBill.aspx.cs" Inherits="BillInfoManage_AddNewBill" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.

<html xmlns="http://www. >
<head runat="server">
    <title><%Response.Write(Config.SiteName);%>-->开单</title>
    <script language="javascript" type="text/javascript">
        function aonclick()
        {
            var tempStr = document.getElementById("Label1").value;
            var result = window.showModalDialog('SearchServeMan.aspx','','dialogHeight:230px; dialogWidth:270px; status:no; help:no; scroll:no;');
            if(result)
            {
                document.getElementById("Label1").value = result;
            }
            else
            {
                document.getElementById("Label1").value = '';
            }
        }
    </script>
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css">
<!--
body,td,th {
    font-family: 宋体;
    font-size: 12px;
}
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
-->
</style></head>
<body>
<form id="form1" runat="server">
  <table width="450" height="82" border="0" cellpadding="0" cellspacing="0" class="tableboder">
    <tr>
      <td height="10" valign="top">&nbsp;</td>
    </tr>
    <tr>
      <td valign="top"><table width="450" height="138" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="85" align="center">&nbsp;&nbsp;&nbsp;&nbsp;餐 台 号:</td>
            <td width="120">
                <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox></td>
            <td width="65"> 房间类型:</td>
            <td width="132">&nbsp;</td>
          </tr>
          <tr>
            <td align="center">&nbsp;&nbsp;&nbsp;最低消费:</td>
            <td width="120"></td>
            <td width="65">计费标准:</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td align="center">&nbsp;&nbsp;&nbsp;宾客人数:</td>
            <td width="120"><asp:TextBox CssClass="textboder" ID="TextBox1" runat="server">0</asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"
                    ErrorMessage="*"></asp:RequiredFieldValidator></td>
            <td width="65"><a href="#" onclick="aonclick();">服&nbsp;务&nbsp;生:</a></td>
            <td><label>
              <input name="textfield" type="text" class="textboder" id="Label1" runat="server" />
            </label></td>
          </tr>
          <tr>
            <td align="center">&nbsp;&nbsp;&nbsp;备&nbsp;&nbsp;&nbsp;&nbsp;注:</td>
            <td colspan="3"><asp:TextBox CssClass="txtboxboder" Height="62px" Width="310px" ID="TextBox2" runat="server" TextMode="MultiLine"></asp:TextBox></td>
          </tr>
        </table>
          <table width="450" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="72" align="center">注:</td>
              <td width="428">(多台计算总人数) </td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td height="40"><asp:ImageButton ID="ImageButton1" runat="server" OnClick="ImageButton1_Click" onmouseover="javascript:this.src='image/okbutton1.png'" onmouseout="javascript:this.src='image/okbutton.png'" ImageUrl="image/okbutton.png" /></td>
            </tr>
        </table></td>
    </tr>
  </table>
</form>
</body>
</html>
2008-05-19 11:45
zhouwei
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2008-4-1
收藏
得分:0 
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class BillInfoManage_AddNewBill : System.Web.UI.Page
{
    LSBLL.SystemMange TempSys = new LSBLL.SystemMange();
    LSModel.BillInfo bif = new LSModel.BillInfo();
    LSBLL.kaidan kaidan = new LSBLL.kaidan();
    LSBLL.ReserveInfo rinfo = new LSBLL.ReserveInfo();
    Maticsoft.BLL.ReserveRestInfo restinfo = new Maticsoft.BLL.ReserveRestInfo();
    Maticsoft.BLL.ReserveConsumerInfo restconsumerinfo = new Maticsoft.BLL.ReserveConsumerInfo();
    string ReserveID = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        try//如果是预定转开单就获取预定号
        {
            ReserveID = Request["ReserveID"];//获取预定号
        }
        catch { ReserveID = ""; }
        //if (!Page.IsPostBack)
        //{
        //    Bind_RestaurantInfo();
        //    Bind_setReserve();
        //    try
        //    {
        //        for (int i = 0; i < TreeView1.Nodes.Count; i++)//用循环是实现了多个餐台
        //        {
        //            for (int j = 0; j < TreeView1.Nodes[i].ChildNodes.Count; j++)
        //            {
        //                if (TreeView1.Nodes[i].ChildNodes[j].Value.Equals(Request["RestID"]))
        //                {
        //                    TreeView1.Nodes[i].ChildNodes[j].Checked = true;
        //                }
        //            }
        //        }
        //    }
        //    catch { }
        //}
    }
    ////设置预定信息
    //protected void Bind_setReserve()
    //{
    //    if (ReserveID != "" && ReserveID != null)//如果预定信息不等于空就可以进行设置数据绑定到界面
    //    {
    //        //查询预定信息主表
    //        DataTable dtTemp = rinfo.selct_terms_yd(ReserveID);
    //        TextBox1.Text = dtTemp.Rows[0]["ManCount"].ToString();//绑定预定人数
    //        //判断是否有预定餐台,循环选择预定的节点
    //        dtTemp = WebLog.DTConvert(restinfo.GetList("ReserveID = '"+ReserveID+"'"));
    //        for (int i = 0; i < dtTemp.Rows.Count; i++)//循环记录
    //        {
    //            for (int j = 0; j < TreeView1.Nodes.Count; j++)//记录界面的一级菜单
    //            {
    //                for (int q = 0; q < TreeView1.Nodes[j].ChildNodes.Count; q++)//循环记录的二级菜单
    //                {
    //                    if (dtTemp.Rows[i]["RestTableID"].ToString().Equals(TreeView1.Nodes[j].ChildNodes[q].Value))
    //                    {
    //                        TreeView1.Nodes[j].ChildNodes[q].Checked = true;
    //                    }
    //                }
    //            }
    //        }
    //        //选择菜品,加入预定的菜品
    //        dtTemp = WebLog.DTConvert(restconsumerinfo.GetList("ReserveID = '"+ReserveID+"'"));//查询出预定菜品的信息
    //        string TempStrLable = "";//储存拼接字符串
    //        for (int i = 0; i < dtTemp.Rows.Count; i++)
    //        {
    //            TempStrLable += "," + dtTemp.Rows[i]["ConsumerItemID"].ToString() + "("
    //            + dtTemp.Rows[i]["CountNum"].ToString() + ")" + "["
    //            + dtTemp.Rows[i]["SDNum"].ToString() + "]";
    //        }

    //        Label1.Value = TempStrLable;
    //    }
    //}
    //protected void Bind_RestaurantInfo()//绑定餐厅信息下拉列表框(预定规格)
    //{
    //    DataTable dtTemp = TempSys.Select_RestaurantInfo();
    //    if (dtTemp != null)
    //    {
            
    //        for (int i = 0; i < dtTemp.Rows.Count; i++)
    //        {
    //            TreeNode tn = new TreeNode(dtTemp.Rows[i]["Rname"].ToString(),
    //                dtTemp.Rows[i]["RowID"].ToString());
    //            TreeView1.Nodes.Add(tn);
    //            TreeView1.Nodes[i].NavigateUrl = "#";
    //            DataTable dtTemp1 = TempSys.Select_YYRestTableInfo("0", dtTemp.Rows[i]["RowID"].ToString());
    //            if (dtTemp1 != null)
    //            {
    //                if (ReserveID == "")
    //                {
    //                    DataView dv = new DataView(dtTemp1);
    //                    dv.RowFilter = "RestTableSite = 0";
    //                    dtTemp1 = dv.ToTable();
    //                }
    //                else
    //                {
    //                    DataView dv = new DataView(dtTemp1);
    //                    dv.RowFilter = "RestTableSite = 0 or RestTableSite = 1";
    //                    dtTemp1 = dv.ToTable();
    //                }
    //                for (int j = 0; j < dtTemp1.Rows.Count; j++)
    //                {
    //                    TreeNode tn1 = new TreeNode(dtTemp1.Rows[j]["RestID"].ToString(),
    //                        dtTemp1.Rows[j]["RestID"].ToString());
    //                    TreeView1.Nodes[i].ChildNodes.Add(tn1);
    //                    TreeView1.Nodes[i].ChildNodes[j].NavigateUrl = "#";
    //                }
    //            }
    //        }
    //        TreeView1.CollapseAll();
    //    }
    //    else
    //    {
    //        LSBLL.WriteLog.writeLog("绑定预定规格出现错误", "查询出来为的数据集null",
    //              "CashierPages/ReserveManage.aspx的数据绑定里面。");
    //        WebLog.PageError("CashierPages/ReserveManage.aspx预定规格查询出来的数据集为null",
    //            "ReserveManage.aspx");
    //    }
    //}
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)//开单
    {
        GetFormValues();
        DateTime dtTemp = DateTime.Now;
        bif.OpenBillTime = dtTemp;
        bif.MainBillID = dtTemp.ToString("YYYYMMddhhmmss");//设置主账单号
        Hashtable hs = new Hashtable();
        int temphsi = 0;
        int TempI = 0;//累加计算子账单号
        string[] RestTableID = TextBox3.Text.Split(',');
        for (int i = 0; i < RestTableID.Length; i++)//用循环是实现了多个餐台
        {
            if (RestTableID[i] != "")
            {
                bif.RestTableID = RestTableID[i];//设置餐台号
                bif.BillID = bif.MainBillID + TempI.ToString();//设置账单号
                if (ReserveID != "" && ReserveID != null)
                {
                    if (rinfo.updateReserveInfoSite(ReserveID, 2) > 0)//预定转开单 改变预定状态
                    {
                        if (kaidan.CreatNewBill(bif) == 0)
                        {
                            hs.Add(temphsi, bif.RestTableID);//开单不成功的餐台记录下来
                            temphsi++;
                        }
                    }
                }
                else
                {
                    if (kaidan.CreatNewBill(bif) == 0)
                    {
                        hs.Add(temphsi, bif.RestTableID);//开单不成功的餐台记录下来
                        temphsi++;
                    }
                }
                TempI++;
            }
        }
        if (hs != null)
        {
            if (hs.Count > 0)
            {
                string tempStr = "开单失败:";
                for (int i = 0; i < hs.Count; i++)
                {
                    tempStr += (hs[i] + ",");
                }
                tempStr += "开单失败!";
                WebLog.PageError(tempStr, "BillList.aspx");
            }
            else
            {
                WebLog.PageRight("开单成功!", "BillList.aspx");
            }
        }
        else {
            WebLog.PageRight("开单成功!", "BillList.aspx");
        }
    }

    protected void GetFormValues()
    {
        //bif.BillID = DateTime.Now.ToString("YYYYMMddhhmmss");
        bif.HavePay = 0;
        bif.LosePay = 0;
        //bif.MainBillID = "";
        bif.ManCount = Convert.ToInt32(TextBox1.Text);
        bif.OpenBillSite = 1;
        //bif.OpenBillTime = DateTime.Now;
        bif.Operator = Config._WorkID;
        bif.PricePay = 0;
        bif.RealPay = 0;
        bif.Remark = TextBox2.Text;
        //bif.RestTableID = 多台开单
        bif.ServiceManID = Label1.Value;
    }
}
2008-05-19 11:46
zhouwei
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2008-4-1
收藏
得分:0 
注释得代码可以不看
2008-05-19 11:46
快速回复:在线等高手进来看看
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017507 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved