コード例 #1
0
        public void BookShow()
        {
            brModel = brBll.GetModel(Convert.ToInt32(id));
            //预定人
            this.lbname.Text = brModel.book_Name;
            //号码
            this.lbtele.Text = brModel.tele_no;

            //客人来源
            Model.guest_source gsModel = gsBll.GetModel(Convert.ToInt32(brModel.source_id));
            this.lbsource.Text = gsModel.gs_name;

            //房型
            Model.room_type rtModel = rtBll.GetModel(Convert.ToInt32(brModel.real_type_id));

            //可退订金
            this.lbdeposit.Text = (Convert.ToDouble(brModel.deposit)).ToString();

            //来店时间
            this.lbtimeto.Text = brModel.time_to.ToString();

            //离店时间
            this.lbtimefrom.Text = brModel.time_from.ToString();

            //绑定房型下拉
        }
コード例 #2
0
        public void BookShow()
        {
            brModel = brBll.GetModel(Convert.ToInt32(id));
            if (brModel != null)
            {
                List <Model.Book_Rdetail> list = bllbr.GetListModel("Book_no='" + brModel.book_no + "'");
                if (list != null)
                {
                    //预定人
                    this.lbname.Text = brModel.book_Name;
                    //号码
                    this.lbtele.Text = brModel.tele_no;

                    //客人来源
                    Model.guest_source gsModel = gsBll.GetModel(Convert.ToInt32(brModel.source_id));
                    this.lbsource.Text = gsModel.gs_name;

                    //房型
                    Model.room_type rtModel = rtBll.GetModel(Convert.ToInt32(list[0].Real_type_Id));
                    this.lbroomtype.Text = rtModel.room_name;

                    //房数
                    this.lbrealnum.Text = list.Count.ToString();

                    //可退订金
                    this.lbdeposit.Text = (Convert.ToDouble(brModel.deposit)).ToString();
                }
            }
        }
コード例 #3
0
        //获得客人来源中文名称

        public string GetSourceTypeName(object id)
        {
            if (id.ToString() == "")
            {
                return("");
            }
            BLL.guest_source   gsbll = new BLL.guest_source();
            Model.guest_source model = gsbll.GetModel(Convert.ToInt32(id.ToString()));
            return(model.gs_name);
        }
コード例 #4
0
 //获得来源
 public string GetLYName(int id)
 {
     Model.guest_source model = fmGust.GetModel(Convert.ToInt32(id.ToString()));
     if (model != null)
     {
         return(model.gs_name);
     }
     else
     {
         return("");
     }
 }
コード例 #5
0
 public string GetSourceName(object id)
 {
     Model.guest_source model = new Model.guest_source();
     try
     {
         model = guestBll.GetModel(Convert.ToInt32(id));
     }
     catch
     {
     }
     return(model.gs_name);
 }
コード例 #6
0
 //获得来源
 public string GetLYName(int id)
 {
     Model.guest_source model = fmGust.GetModel(Convert.ToInt32(id.ToString()));
     return(model.gs_name);
 }
コード例 #7
0
        /// <summary>
        /// 添加其他资料
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            int Result = 0;

            Model.guest_source  fm     = new Model.guest_source();
            Model.meth_pay      fpay   = new Model.meth_pay();
            Model.card_type     fmtype = new Model.card_type();
            Model.hourse_scheme fmsc   = new Model.hourse_scheme();
            Model.comm_unit     fmcom  = new Model.comm_unit();
            Model.room_feature  fmture = new Model.room_feature();
            if (txt_type.Value == "0")
            {
                fm.gs_name = txt_name.Value;
                Result     = fmgeust.Add(fm);
            }
            if (txt_type.Value == "1")
            {
                fmcom.unit_name = txt_name.Value;
                Result          = fmunit.Add(fmcom);
            }
            if (txt_type.Value == "2")
            {
                fmture.room_feature_name = txt_name.Value;
                Result = fmfea.Add(fmture);
            }
            if (txt_type.Value == "3")
            {
                fpay.meth_pay_name = txt_name.Value;
                Result             = fmmety.Add(fpay);
            }
            if (txt_type.Value == "4")
            {
                fmtype.ct_name = txt_name.Value;
                Result         = fmcdtype.Add(fmtype);
            }
            if (txt_type.Value == "5")
            {
                fmsc.hs_name = txt_name.Value;
                Result       = fmroom.Add(fmsc);
            }
            if (txt_type.Value == "6")
            {
            }
            if (txt_type.Value == "7")
            {
                BLL.customerState   bllcs = new BLL.customerState();
                Model.customerState model = new Model.customerState();
                model.csName = txt_name.Value;
                Result       = bllcs.Add(model);
            }
            if (txt_type.Value == "8")
            {
                BLL.customerType   bllcs = new BLL.customerType();
                Model.customerType model = new Model.customerType();
                model.ctName = txt_name.Value;
                Result       = bllcs.Add(model);
            }
            if (txt_type.Value == "9")
            {
                BLL.cIndustry   bllcs = new BLL.cIndustry();
                Model.cIndustry model = new Model.cIndustry();
                model.csName = txt_name.Value;
                Result       = bllcs.Add(model);
            }
            if (txt_type.Value == "10")
            {
                BLL.cpType   bllcs = new BLL.cpType();
                Model.cpType model = new Model.cpType();
                model.ptName = txt_name.Value;
                Result       = bllcs.Add(model);
            }
            if (txt_type.Value == "11")
            {
                BLL.csysType   bllcs = new BLL.csysType();
                Model.csysType model = new Model.csysType();
                model.stName = txt_name.Value;
                Result       = bllcs.Add(model);
            }
            if (txt_type.Value == "12")
            {
                BLL.cDepartment   bllcs = new BLL.cDepartment();
                Model.cDepartment model = new Model.cDepartment();
                model.cDName = txt_name.Value;
                Result       = bllcs.Add(model);
            }
            if (txt_type.Value == "13")
            {
                BLL.cPost   bllcs = new BLL.cPost();
                Model.cPost model = new Model.cPost();
                model.cpName = txt_name.Value;
                Result       = bllcs.Add(model);
            }
            if (txt_type.Value == "14")
            {
                BLL.cCall   bllcs = new BLL.cCall();
                Model.cCall model = new Model.cCall();
                model.callName = txt_name.Value;
                Result         = bllcs.Add(model);
            }
            if (Result > 0)
            {
                txt_name.Value = "";
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "click", "alert('保存成功');", true);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "click", "alert('保存失败');", true);
            }
            btnSercher_Click(null, null);
        }