Esempio n. 1
0
        //第一次加载显示的值
        public void RealPrice()
        {
            //先获取房型房价 然后再打折扣
            int room_type_Id = Convert.ToInt32(this.RoomTypeDdl.SelectedValue);

            Model.room_type model = rtBll.GetModel(room_type_Id);
            pricetxt.Value = Convert.ToDecimal(model.room_listedmoney).ToString("0.##");
            int house_shame_id = Convert.ToInt32(this.HouseShameDdl.SelectedValue);

            Model.hourse_scheme hsmodel = hsBll.GetModel(house_shame_id);

            double room_money = (Convert.ToDouble(model.room_listedmoney));

            double discount = (Convert.ToDouble(hsmodel.hs_Discount));

            this.real_price.Value = (room_money * discount).ToString();

            //默认来店时间
            this.time_to.Value = System.DateTime.Now.Date.ToShortDateString();

            //默认入住时间
            this.real_time.Value = System.DateTime.Now.Date.AddDays(1).ToShortDateString() + " " + "18:00";
            Model.SysParamter modelsys = new Model.SysParamter();
            BLL.SysParameter  blls     = new SysParameter();
            modelsys = blls.GetModel(1);
            TimeSpan dt1 = TimeSpan.Parse(modelsys.DayOutTime.ToString());//得到系统设置的天房退房时间

            //默认离店时间
            this.time_from.Value = System.DateTime.Now.Date.AddDays(2).AddHours(dt1.Hours).ToString();
        }
Esempio n. 2
0
        /// <summary>
        /// 通过方案ID获得方案折扣
        /// </summary>
        private void GetFA()
        {
            string id = context.Request.QueryString["id"];

            Model.hourse_scheme modelhs = bllhs.GetModel(Convert.ToInt32(id));
            if (modelhs != null)
            {
                context.Response.Write(modelhs.hs_Discount);
            }
            else
            {
                context.Response.Write(1);
            }
        }
Esempio n. 3
0
        private void GetFA1()
        {
            string id = context.Request.QueryString["id"];

            Model.hourse_scheme modelhs = bllhs.GetModel(Convert.ToInt32(id));
            if (modelhs != null)
            {
                context.Response.Write(Convert.ToDecimal(modelhs.Hs_zdr).ToString("0.##"));
            }
            else
            {
                context.Response.Write(1);
            }
        }
Esempio n. 4
0
 /// <summary>
 /// 添加班次
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSave_Click(object sender, EventArgs e)
 {
     Model.hourse_scheme modl = new Model.hourse_scheme();
     modl.hs_name     = txt_name.Value;
     modl.hs_Discount = txt_zkfa.Value;
     if (fmshif.Add(modl) > 0)
     {
         ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript' defer>alert('保存成功!');</script>");
     }
     else
     {
         ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript' defer>alert('保存失败!');</script>");
     }
     btnSeach_Click(null, null);
 }
Esempio n. 5
0
 /// <summary>
 /// 修改
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnSave_Click(object sender, EventArgs e)
 {
     Model.hourse_scheme modl = new Model.hourse_scheme();
     modl.hs_name     = txt_name.Value;
     modl.hs_Discount = txt_zkfa.Value;
     modl.id          = Convert.ToInt32(Request.QueryString["id"].ToString());
     if (fmshif.Update(modl))
     {
         ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript' defer>alert('修改成功!');parent.Window_Close();</script>");
     }
     else
     {
         ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript' defer>alert('修改失败!');</script>");
     }
 }
Esempio n. 6
0
 /// <summary>
 /// 确定
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void BtnOk_Click(object sender, EventArgs e)
 {
     Model.hourse_scheme model = new Model.hourse_scheme();
     model.hs_room     = Convert.ToInt32(ddroomtype.SelectedValue);
     model.hs_name     = Hs_name.Value;
     model.hs_Discount = hs_Discount.Value;
     model.Hs_isAll    = Hs_isAll.Checked;
     model.Hs_Strat    = Convert.ToDateTime(Hs_Strat.Value);
     model.Hs_End      = Convert.ToDateTime(Hs_End.Value);
     model.Hs_zdr      = Convert.ToDecimal(Hs_zdr.Value);
     model.Hs_Reamrk   = Hs_Reamrk.Value;
     if (fmshif.Add(model) > 0)
     {
         Response.Write("<script>alert('添加成功');window.location.href='fjfadefalut.aspx'</script>");
     }
 }
Esempio n. 7
0
        //根据方案设置房价
        protected void HouseShameDdl_SelectedIndexChanged(object sender, EventArgs e)
        {
            //先获取房型房价 然后再打折扣
            int room_type_Id = Convert.ToInt32(this.RoomTypeDdl.SelectedValue);

            Model.room_type model = rtBll.GetModel(room_type_Id);

            int house_shame_id = Convert.ToInt32(this.HouseShameDdl.SelectedValue);

            Model.hourse_scheme hsmodel = hsBll.GetModel(house_shame_id);

            double room_money = (Convert.ToDouble(model.room_listedmoney));

            double discount = (Convert.ToDouble(hsmodel.hs_Discount)) * 0.1;

            this.real_price.Value = (room_money * discount).ToString();
        }
Esempio n. 8
0
        /// <summary>
        /// 改变价格方法
        /// </summary>
        private void UpdatePrice()
        {
            string typeid = context.Request.QueryString["typeid"];
            string fa     = context.Request.QueryString["fa"];

            Model.room_type     modelrt = bllrt.GetModel(Convert.ToInt32(typeid));
            Model.hourse_scheme modelhs = bllhs.GetModel(Convert.ToInt32(fa));
            double d = 0;

            if (modelrt != null && modelhs != null)
            {
                d = Convert.ToDouble(modelrt.room_listedmoney) * Convert.ToDouble(modelhs.hs_Discount);
            }
            var obj = new{ d = d, price = modelrt.room_listedmoney };

            string str = js.Serialize(obj);

            context.Response.Write(str);
        }
Esempio n. 9
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);
        }