예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            //显示选择的住户信息
            frmSelectInfo frm = new frmSelectInfo();

            frm.Flag      = "frmKFRZEDit.txtYDXX";
            frm.TableName = "预定信息";
            frm.CurForm   = this;
            frm.ShowDialog();
            DataTable dt = new DataTable();

            if (this.txtYDXX.Tag != null)
            {
                dt = db.Get("SELECT 客户代码, 姓名, 性别, 随行人数, 证件类型, 证件号码, 民族, 籍贯, 地址, 电话, 备注 FROM dbo.客户 where 客户代码=(select 客户代码 from 房间预定 where 预定代码=" + txtYDXX.Tag.ToString() + ")");
                if (dt.Rows.Count > 0)
                {
                    txtKHXX.Text = "姓名:" + dt.Rows[0]["姓名"].ToString() + "\r\n性别:" + dt.Rows[0]["性别"].ToString() + "\r\n证件类型:" + dt.Rows[0]["证件类型"].ToString() + "\r\n证件号码:" + dt.Rows[0]["证件号码"].ToString();
                    txtKHXX.Tag  = dt.Rows[0]["客户代码"].ToString();
                }
                dt = db.Get("SELECT 房间信息.房间代码, 房间信息.房号, 房间信息.楼层,       房间信息.单价, 房间信息.房间电话, 房间信息.房间备注,       房间信息.房屋状态, 客房类型.类型名称 FROM 房间信息 INNER JOIN       客房类型 ON 房间信息.类型代码 = 客房类型.类型代码 where 房间代码=(select 房间代码 from 房间预定 where 预定代码=" + txtYDXX.Tag.ToString() + ")");
                if (dt.Rows.Count > 0)
                {
                    txtFJXX.Text = "房号:" + dt.Rows[0]["房号"].ToString() + "\r\n楼层:" + dt.Rows[0]["楼层"].ToString() + "\r\n单价:" + dt.Rows[0]["单价"].ToString() + "\r\n房型:" + dt.Rows[0]["类型名称"].ToString();
                    txtFJXX.Tag  = dt.Rows[0]["房间代码"].ToString();
                }
            }
        }
예제 #2
0
        private void btnKH_Click(object sender, EventArgs e)
        {
            //显示选择的住户信息
            frmSelectInfo frm = new frmSelectInfo();

            frm.Flag      = "frmKFRZEDit.txtKHXX";
            frm.TableName = "客户信息";
            frm.CurForm   = this;
            frm.ShowDialog();
        }
예제 #3
0
        private void btnFJ_Click(object sender, EventArgs e)
        {
            //显示选择的住户信息
            frmSelectInfo frm = new frmSelectInfo();

            frm.Flag      = "frmFJYDEdit.txtFJXX";
            frm.TableName = "房间信息";
            frm.CurForm   = this;
            frm.ShowDialog();
        }
예제 #4
0
        private void btn_Click(object sender, EventArgs e)
        {
            //显示选择的住户信息
            frmSelectInfo frm = new frmSelectInfo();

            frm.Flag      = "FrmFjEdit.txtLXDM";
            frm.TableName = "客房类型";
            frm.CurForm   = this;
            frm.ShowDialog();
            DataTable dt = new DataTable();

            if (mPID == "")
            {
                return;
            }
            dt = db.Get("SELECT * frOM 客房类型  where  类型代码=" + mPID + "");
            if (dt.Rows.Count > 0)
            {
                txtLXDM.Text = dt.Rows[0]["类型名称"].ToString();
                txtLXDM.Tag  = dt.Rows[0]["类型代码"].ToString();
            }
        }