コード例 #1
0
        //通过原来的主单信息来新增一条另外的主单,返回真假(mainRecord)
        //lsbh为原来的主单的
        //lsbh_news为新生成的那条的


        //通过房间类型得到房间价格
        //private decimal Get_JGByFjrb(string fjrb)
        //{
        //    decimal fjjg = 0;
        //    BLL.Ffjrb B_Ffjrb = new Hotel_app.BLL.Ffjrb();
        //    Model.Ffjrb M_Ffjrb = new Hotel_app.Model.Ffjrb();
        //    if (B_Ffjrb.GetModelList("fjrb='" + fjrb + "'")[0].sjjg != null)
        //    {
        //        return B_Ffjrb.GetModelList("fjrb='" + fjrb + "'")[0].sjjg;
        //    }
        //    else
        //    {
        //        return 0;
        //    }
        //}

        //得到fjrb,lsbh,lzfs=1&&fjbh=""时的Qskyd_fjrb的模
        private Model.Qskyd_fjrb GetModel(string fjrb, string lsbh)
        {
            BLL.Qskyd_fjrb B_Qsky_fjrb = new Hotel_app.BLL.Qskyd_fjrb();
            if (B_Qsky_fjrb.GetModelList("lsbh='" + lsbh + "'  and fjrb='" + fjrb + "'").Count > 0)
            {
                return(B_Qsky_fjrb.GetModelList("lsbh='" + lsbh + "'  and fjrb='" + fjrb + "'")[0]);
            }
            else
            {
                return(null);
            }
        }
コード例 #2
0
        ///房号,房态来返回图标的名称
        ///
        public static string  GetIco(string fjbh, string fjrb)
        {
            string icoName = "a-4.ico";//默认显示哪个

            if (!fjbh.Equals("") && !fjrb.Equals(""))
            {
                BLL.Qskyd_fjrb          B_Qskyd_fjrb = new Hotel_app.BLL.Qskyd_fjrb();
                List <Model.Qskyd_fjrb> list         = B_Qskyd_fjrb.GetModelList(" id>=0  and   fjbh='" + fjbh + "'   and   yddj='" + common_yddj.yddj_dj + "' ");
                if (list.Count > 0)
                {
                    if (list[0].sktt.Equals(common_sktt.sktt_sk))
                    {
                        icoName = ""; return(icoName);;
                    }
                    ;
                    if (list[0].sktt.Equals(common_sktt.sktt_cz))
                    {
                        icoName = "house.ico"; return(icoName);
                    }
                    ;
                    if (list[0].sktt.Equals(common_sktt.sktt_zd))
                    {
                        icoName = "c-4.ico"; return(icoName);
                    }
                    ;
                    if (list[0].sktt.Equals(common_sktt.sktt_tt))
                    {
                        icoName = "tuanti.ico"; return(icoName);
                    }
                    ;
                    if (list[0].sktt.Equals(common_sktt.sktt_hy))
                    {
                        icoName = "a-11.ico"; return(icoName);
                    }
                    ;
                }
            }
            return(icoName);
        }
コード例 #3
0
        //团体多间排房
        /// <summary>
        ///
        /// </summary>
        /// <param name="tt_id"></param>
        /// <param name="lsbh"></param>
        /// <param name="fjrb"></param>
        /// <param name="strs_fjbh">fjbh的列表</param>
        /// <param name="fjjg"></param>
        /// <param name="shqh"></param>
        /// <param name="yh"></param>
        /// <param name="bz"></param>
        /// <param name="czy"></param>
        /// <returns></returns>
        public string tt_pf_multi(string tt_id, string lsbh, string fjrb, string[] strs_fjbh, string fjjg, string shqh, string yh, string bz, string czy, string czsj, string cznr, string xxzs)
        {
            string s         = common_file.common_app.get_failure;
            string lsbh_new  = "";
            string krxm_temp = "";
            int    id_temp   = 0;

            Hotel_app.Model.Qskyd_fjrb       M_Qskyd_fjrb;
            Hotel_app.BLL.Qskyd_fjrb         B_Qskyd_fjrb = new Hotel_app.BLL.Qskyd_fjrb();
            Hotel_app.Model.Qttyd_mainrecord M_Qttyd_mainrecord;
            Hotel_app.BLL.Qttyd_mainrecord   B_Qttyd_mainrecord             = new Hotel_app.BLL.Qttyd_mainrecord();
            Qskyd_fjrb_add_edit_delete       Qskyd_fjrb_add_edit_delete_new = new Qskyd_fjrb_add_edit_delete();

            Ffjzt.Flfsz_add_edit Flfsz_add_edit_new = new Hotel_app.Server.Ffjzt.Flfsz_add_edit();
            BLL.Common           B_Common           = new Hotel_app.BLL.Common();
            DataSet DS_temp = B_Common.GetList("select id from Xqyxx", "id>=0");

            //获取公共信息
            M_Qttyd_mainrecord = B_Qttyd_mainrecord.GetModelList("lsbh='" + lsbh + "'")[0];
            string lfbh_news = ""; int judge_get_lfbh = 2;

            foreach (string fjbh in strs_fjbh)
            {
                if (fjbh != null && fjbh.Trim() != "")
                {
                    //生成新的临时编号
                    if (M_Qttyd_mainrecord.yddj == common_file.common_yddj.yddj_dj)
                    {
                        lsbh_new = common_file.common_ddbh.ddbh("skdj", "skdjdate", "skdjcounter", 6);
                    }
                    else
                    if (M_Qttyd_mainrecord.yddj == common_file.common_yddj.yddj_yd)
                    {
                        lsbh_new = common_file.common_ddbh.ddbh("skyd", "skyddate", "skydcounter", 6);
                    }

                    //生成客人的临时姓名(团体名称+房间编号)
                    krxm_temp = M_Qttyd_mainrecord.krxm + "_" + fjbh;

                    s = common_file_server.Common_pl_Qskyd_mainRecord_add.TT_plAdd(lsbh, lsbh_new, krxm_temp, czy, czsj.ToString(), xxzs);//根据lsbh读起主单信息,添加一条有房号的记录。

                    //增加配置费用
                    Q_ff_xyxf Q_ff_xyxf_new = new Q_ff_xyxf();
                    //Q_ff_xyxf_new.Qyddj_otherfee_add(M_Qttyd_mainrecord.yydh, M_Qttyd_mainrecord.qymc, lsbh_new, "", M_Qttyd_mainrecord.sktt, "", czy);
                    Q_ff_xyxf_new.Qyddj_otherfee_add(M_Qttyd_mainrecord.yydh, M_Qttyd_mainrecord.qymc, lsbh_new, krxm_temp, M_Qttyd_mainrecord.sktt, "", czy); //把名称加进去
                    if (s == common_file.common_app.get_suc)                                                                                                   //增加成功
                    {
                        s = common_file.common_app.get_failure;
                        #region 修改成员主单的房间类别表的信息
                        M_Qskyd_fjrb      = B_Qskyd_fjrb.GetModelList("lsbh='" + lsbh_new + "'")[0];
                        id_temp           = M_Qskyd_fjrb.id;
                        M_Qskyd_fjrb.fjbh = fjbh;
                        M_Qskyd_fjrb.fjrb = fjrb;
                        M_Qskyd_fjrb.shqh = shqh;
                        M_Qskyd_fjrb.fjjg = decimal.Parse(fjjg);
                        M_Qskyd_fjrb.yh   = yh;
                        M_Qskyd_fjrb.yhbl = Get_yhblByYh(yh);
                        M_Qskyd_fjrb.bz   = bz;
                        M_Qskyd_fjrb.lzfs = 1;
                        M_Qskyd_fjrb.id   = id_temp;

                        DS_temp = B_Common.GetList("select * from Qskyd_fjrb", "id='" + tt_id + "'");
                        if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
                        {
                            M_Qskyd_fjrb.fjbm = DS_temp.Tables[0].Rows[0]["fjbm"].ToString();
                        }


                        //新增的成员主单修改成功后,更新lzfs(这里调用Qskyd_fjrb_add_edit_delete这个类的方法,注意里面有修改房态的部分)
                        //if (B_Qskyd_fjrb.Update(M_Qskyd_fjrb))
                        if (Qskyd_fjrb_add_edit_delete_new.Qskyd_fjrb_add_edit_delete_app(id_temp.ToString(), M_Qskyd_fjrb.yydh, M_Qskyd_fjrb.qymc, lsbh_new, GetStringValue(M_Qskyd_fjrb.krxm), common_file.common_sktt.sktt_tt, GetStringValue(M_Qskyd_fjrb.yddj), fjrb, fjbh, M_Qskyd_fjrb.ddsj, M_Qskyd_fjrb.lksj, decimal.Parse("1"), shqh, decimal.Parse(fjjg), decimal.Parse(fjjg), yh, Get_yhblByYh(yh), bz, czy, DateTime.Now, "新增", GetStringValue(M_Qskyd_fjrb.yddj), common_file.common_app.get_edit, common_file.common_app.xxzs, M_Qskyd_fjrb.fjbm, M_Qskyd_fjrb.jcje) == common_file.common_app.get_suc)
                        {
                            M_Qskyd_fjrb       = B_Qskyd_fjrb.GetModel(int.Parse(tt_id));
                            M_Qskyd_fjrb.lzfs -= 1;
                            M_Qskyd_fjrb.id    = int.Parse(tt_id);
                            if (B_Qskyd_fjrb.Update(M_Qskyd_fjrb))
                            {
                                //if (judge_get_lfbh != 3)
                                //{
                                //    DS_temp = B_Common.GetList("select lfbh from Flfsz", "lsbh in(select lsbh from Qskyd_mainrecord where ddbh='" + M_Qttyd_mainrecord.ddbh + "')");
                                //    if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
                                //    {
                                //        lfbh_news = DS_temp.Tables[0].Rows[0]["lfbh"].ToString();
                                //        judge_get_lfbh = 3;
                                //    }
                                //    else
                                //    {
                                //        lfbh_news = common_file.common_ddbh.ddbh("lf", "lfdate", "lfcounter", 6);
                                //        judge_get_lfbh = 3;
                                //    }
                                //}



                                //s = Flfsz_add_edit_new.Flfsz_add_edit_delete("", M_Qskyd_fjrb.yydh, M_Qskyd_fjrb.qymc, lfbh_news, lsbh_new, fjbh, M_Qskyd_fjrb.krxm, M_Qskyd_fjrb.sktt, M_Qskyd_fjrb.yddj, czy, czsj.ToString(), false, common_file.common_app.get_add, xxzs);

                                s = common_file.common_app.get_suc;
                            }
                        }
                        #endregion
                    }
                }
            }
            DS_temp.Dispose();
            return(s);
        }
コード例 #4
0
        /// <summary>
        /// 处理团体排房
        /// </summary>
        /// <param name="tt_id">团体房间类别表的ID</param>
        /// <param name="fjrb"></param>
        /// <param name="fjjg"></param>
        /// <param name="shqh"></param>
        /// <param name="yh"></param>
        /// <param name="yhbl"></param>
        /// <param name="bz"></param>
        /// <returns></returns>
        public string tt_pf(string tt_id, string lsbh, string fjrb, string fjbh, string fjjg, string shqh, string yh, string bz, string czy, string xxzs)
        {
            string   s         = common_file.common_app.get_failure;
            string   lsbh_new  = "";
            string   krxm_temp = "";
            int      id_temp   = 0;
            DateTime czsj      = DateTime.Now;

            Hotel_app.Model.Qskyd_fjrb       M_Qskyd_fjrb;
            Hotel_app.BLL.Qskyd_fjrb         B_Qskyd_fjrb = new Hotel_app.BLL.Qskyd_fjrb();
            Hotel_app.Model.Qttyd_mainrecord M_Qttyd_mainrecord;
            Hotel_app.BLL.Qttyd_mainrecord   B_Qttyd_mainrecord             = new Hotel_app.BLL.Qttyd_mainrecord();
            Qskyd_fjrb_add_edit_delete       Qskyd_fjrb_add_edit_delete_new = new Qskyd_fjrb_add_edit_delete();

            //获取公共信息
            M_Qttyd_mainrecord = B_Qttyd_mainrecord.GetModelList("lsbh='" + lsbh + "'")[0];
            //生成新的临时编号

            if (M_Qttyd_mainrecord.yddj == common_file.common_yddj.yddj_dj)
            {
                lsbh_new = common_file.common_ddbh.ddbh("skdj", "skdjdate", "skdjcounter", 6);
            }
            else
            if (M_Qttyd_mainrecord.yddj == common_file.common_yddj.yddj_yd)
            {
                lsbh_new = common_file.common_ddbh.ddbh("skyd", "skyddate", "skydcounter", 6);
            }
            //生成客人的临时姓名(团体名称+房间编号)
            krxm_temp = M_Qttyd_mainrecord.krxm + fjbh;

            s = common_file_server.Common_pl_Qskyd_mainRecord_add.TT_plAdd(lsbh, lsbh_new, krxm_temp, czy, czsj.ToString(), xxzs);//根据lsbh读起主单信息,添加一条有房号的记录。
            //增加配置费用
            Q_ff_xyxf Q_ff_xyxf_new = new Q_ff_xyxf();

            Q_ff_xyxf_new.Qyddj_otherfee_add(M_Qttyd_mainrecord.yydh, M_Qttyd_mainrecord.qymc, M_Qttyd_mainrecord.lsbh, "", M_Qttyd_mainrecord.sktt, "", czy);



            if (s == common_file.common_app.get_suc)//增加成功
            {
                s = common_file.common_app.get_failure;
                #region 修改成员主单的房间类别表的信息
                M_Qskyd_fjrb      = B_Qskyd_fjrb.GetModelList("lsbh='" + lsbh_new + "'")[0];
                id_temp           = M_Qskyd_fjrb.id;
                M_Qskyd_fjrb.fjbh = fjbh;
                M_Qskyd_fjrb.fjrb = fjrb;
                M_Qskyd_fjrb.shqh = shqh;
                M_Qskyd_fjrb.fjjg = decimal.Parse(fjjg);
                M_Qskyd_fjrb.yh   = yh;
                M_Qskyd_fjrb.yhbl = Get_yhblByYh(yh);
                M_Qskyd_fjrb.bz   = bz;
                M_Qskyd_fjrb.lzfs = 1;
                M_Qskyd_fjrb.id   = id_temp;

                //新增的成员主单修改成功后,更新lzfs(这里调用Qskyd_fjrb_add_edit_delete这个类的方法,注意里面有修改房态的部分)
                //if (B_Qskyd_fjrb.Update(M_Qskyd_fjrb))
                if (Qskyd_fjrb_add_edit_delete_new.Qskyd_fjrb_add_edit_delete_app(id_temp.ToString(), M_Qskyd_fjrb.yydh, M_Qskyd_fjrb.qymc, lsbh_new, GetStringValue(M_Qskyd_fjrb.krxm), common_file.common_sktt.sktt_tt, GetStringValue(M_Qskyd_fjrb.yddj), fjrb, fjbh, M_Qskyd_fjrb.ddsj, M_Qskyd_fjrb.lksj, decimal.Parse("1"), shqh, decimal.Parse(fjjg), decimal.Parse(fjjg), yh, Get_yhblByYh(yh), bz, czy, DateTime.Now, "新增", GetStringValue(M_Qskyd_fjrb.yddj), common_file.common_app.get_edit, common_file.common_app.xxzs, M_Qskyd_fjrb.fjbm, M_Qskyd_fjrb.jcje) == common_file.common_app.get_suc)
                {
                    M_Qskyd_fjrb       = B_Qskyd_fjrb.GetModel(int.Parse(tt_id));
                    M_Qskyd_fjrb.lzfs -= 1;
                    M_Qskyd_fjrb.id    = int.Parse(tt_id);
                    if (B_Qskyd_fjrb.Update(M_Qskyd_fjrb))
                    {
                        s = common_file.common_app.get_suc;
                    }
                }
                #endregion
            }
            return(s);
        }
コード例 #5
0
        public void b_save_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            url = common_file.common_app.service_url;
            //更新Qskyd_fqrb

            //M_Qskyd_fjrb = B_Qskyd_fjrb.GetModel(int.Parse(Qskdj_fjrb_id));



            if (this.tB_lzfs.Text.Trim() == "" || decimal.Parse(this.tB_lzfs.Text.Trim()) < 0)
            {
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "请填写入住房数!");
                tB_lzfs.Focus();
                return;
            }



            if (yddj_type == common_file.common_app.yddj_type_personal)
            {
                common_file.common_app.get_czsj();
                #region 处理散客的部分

                //登记的时候
                if (this.yddj == common_file.common_yddj.yddj_dj)
                {
                    if (tB_fjrb.Text.Trim() == "")
                    {
                        common_file.common_app.Message_box_show(common_file.common_app.message_title, "请选择房型!");
                        tB_fjrb.Focus();
                        return;
                    }
                    if (tB_fjbh.Text.Trim() == "")
                    {
                        common_file.common_app.Message_box_show(common_file.common_app.message_title, "请选择房号!");
                        tB_fjbh.Focus();
                        return;
                    }

                    if (tB_lzfs.Text.Trim() == "")
                    {
                        common_file.common_app.Message_box_show(common_file.common_app.message_title, "登记状态下请将写入住房数不能为空!");
                        tB_lzfs.Focus();
                        tB_lzfs.SelectAll();
                        return;
                    }

                    else
                    {
                        int i_1 = 3;
                        if (M_Qskyd_fjrb == null)
                        {
                            i_1 = 3;
                        }
                        else
                        {
                            if (M_Qskyd_fjrb != null && (M_Qskyd_fjrb.lzfs == 0 && (decimal.Parse(tB_lzfs.Text)) == 0))
                            {
                                i_1 = 2;
                            }
                            else
                            {
                                i_1 = 3;
                            }
                        }
                        if (i_1 == 3)
                        {
                            if ((decimal.Parse(tB_lzfs.Text) - 1) != 0)
                            {
                                common_file.common_app.Message_box_show(common_file.common_app.message_title, "登记状态下请将写入住房数为1!");
                                tB_lzfs.Focus();
                                tB_lzfs.SelectAll();
                                return;
                            }
                        }
                    }

                    common_file.common_app.get_czsj();
                    M_Qskyd_fjrb = B_Qskyd_fjrb.GetModel(int.Parse(Qskdj_fjrb_id));
                    url         += "Qyddj/Qyddj_app.asmx";
                    object[] args = new object[26];
                    args[0]  = Qskdj_fjrb_id;
                    args[1]  = common_file.common_app.yydh;
                    args[2]  = common_file.common_app.qymc;
                    args[3]  = M_Qskyd_fjrb.lsbh;
                    args[4]  = M_Qskyd_fjrb.krxm;
                    args[5]  = M_Qskyd_fjrb.sktt;
                    args[6]  = M_Qskyd_fjrb.yddj;
                    args[7]  = tB_fjrb.Text.Trim().Replace("'", "_");
                    args[8]  = tB_fjbh.Text.Trim().Replace("'", "_");
                    args[9]  = M_Qskyd_fjrb.ddsj;
                    args[10] = M_Qskyd_fjrb.lksj;
                    if (tB_lzfs.Text.Trim() == "")
                    {
                        args[11] = 0;
                    }
                    else
                    {
                        args[11] = Convert.ToDecimal(tB_lzfs.Text.Trim().Replace("'", "_"));
                    }
                    args[12] = cB_shqh.Text.Trim().Replace("'", "_");
                    args[13] = decimal.Parse(common_file.common_sswl.Round_sswl(double.Parse(tB_fjjg.Text.Trim().Replace("'", "_")), common_file.common_sswl.sswl_ws, common_file.common_sswl.selectMode_sel).ToString());
                    args[14] = decimal.Parse(common_file.common_sswl.Round_sswl(double.Parse(tB_fjjg.Text.Trim().Replace("'", "_")) * double.Parse(yhbl.ToString()), common_file.common_sswl.sswl_ws, common_file.common_sswl.selectMode_sel).ToString());
                    args[15] = tB_yh.Text.Trim().Replace("'", "_");
                    args[16] = yhbl;
                    args[17] = tB_bz.Text.Trim().Replace("'", "_");
                    args[18] = common_file.common_app.czy;
                    args[19] = DateTime.Now;
                    args[20] = common_file.common_app.chinese_edit;
                    args[21] = M_Qskyd_fjrb.yddj;//有三种状态,一种预订、一种登记、一种预订转登记
                    args[22] = judge_add_edit;
                    args[23] = common_file.common_app.xxzs;
                    args[24] = cB_fjbm.Text.Trim().Replace("'", "_");
                    args[25] = 0;
                    if (tB_jcje.Text.Trim() != "")
                    {
                        args[25] = decimal.Parse(common_file.common_sswl.Round_sswl(double.Parse(tB_jcje.Text.Trim().Replace("'", "_")), common_file.common_sswl.sswl_ws, common_file.common_sswl.selectMode_sel).ToString());
                    }
                    //先判断是否超排房

                    if (judge_add_edit == common_file.common_app.get_edit)
                    {
                        if (M_Qskyd_fjrb.fjbh != "")
                        {
                            if (decimal.Parse(args[11].ToString()) > 1)
                            {
                                common_file.common_app.Message_box_show(common_file.common_app.message_title, "对不起,已经排房的记录不能直接修改房数!");
                                return;
                            }
                        }
                    }


                    if (judge_kyfs(M_Qskyd_fjrb.krxm, tB_fjbh.Text, M_Qskyd_fjrb.lsbh) == true)
                    {
                        Hotel_app.Server.Qyddj.Qskyd_fjrb_add_edd_delete_1 Qskyd_fjrb_add_edd_delete_1_services = new Hotel_app.Server.Qyddj.Qskyd_fjrb_add_edd_delete_1();
                        string result = Qskyd_fjrb_add_edd_delete_1_services.Qskyd_fjrb_add_edit_delete_app_1(args[0].ToString(), args[1].ToString(), args[2].ToString(), args[3].ToString(), args[4].ToString(), args[5].ToString(), args[6].ToString(), args[7].ToString(), args[8].ToString(), DateTime.Parse(args[9].ToString()),
                                                                                                              DateTime.Parse(args[10].ToString()), Decimal.Parse(args[11].ToString()), args[12].ToString(), Decimal.Parse(args[13].ToString()), Decimal.Parse(args[14].ToString()), args[15].ToString(), Decimal.Parse(args[16].ToString()), args[17].ToString(), args[18].ToString(), DateTime.Parse(args[19].ToString()), args[20].ToString(), args[21].ToString(),
                                                                                                              args[22].ToString(), args[23].ToString(), args[24].ToString(), Decimal.Parse(args[25].ToString()));
                        //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Qskyd_fjrb_add_edit_delete_app", args);
                        //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Qskyd_fjrb_add_edit_delete_app_1", args);
                        if (result != null && result.ToString() == common_file.common_app.get_suc)
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "保存成功!");
                            this.DialogResult = DialogResult.OK;
                            common_file.common_form.Qskdj_new.lsbh = M_Qskyd_fjrb.lsbh;
                            common_file.common_form.Qskdj_new.refresh_app();
                        }
                        else
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作失败!");
                        }
                    }
                }
                //预订
                if (this.yddj == common_file.common_yddj.yddj_yd)
                {
                    if (decimal.Parse(this.tB_lzfs.Text.Trim()) == 0)
                    {
                        common_file.common_app.Message_box_show(common_file.common_app.message_title, "请填写入住房数!");
                        tB_lzfs.Focus();
                        return;
                    }


                    common_file.common_app.get_czsj();
                    if (tB_fjrb.Text.Trim() == "")
                    {
                        common_file.common_app.Message_box_show(common_file.common_app.message_title, "请选择房间类型!");
                        return;
                    }
                    //新增,要判断  这种类型的房间是否有都排完
                    //修改时,类型有改变,要判断改后类型是存在未排完的
                    if (B_Qskyd_fjrb.GetModelList("yydh='" + common_file.common_app.yydh + "'  and lsbh='" + lsbh + "'  and fjbh='' and id!='" + Qskdj_fjrb_id + "' and  fjrb='" + tB_fjrb.Text + "'").Count > 0)
                    {
                        common_file.common_app.Message_box_show(common_file.common_app.message_title, "此种房型已经存在,不能再重新排同种房,如有需要增加请去修改数量!");
                        return;
                    }

                    //三种情况下判断是否发送短信:
                    //旧的房型为空,当前的不为空
                    //旧的不为空,当前的不等于旧的
                    //旧的不为空,当前的数量不等于旧的预定数量
                    bool dx_fs = false;//标注短信是否发送

                    //if (( (old_fx.Trim().Equals("") && !tB_fjrb.Text.Trim().Equals("")) || (!old_fx.Trim().Equals("") && !old_fx.Equals(tB_fjrb.Text.Trim())) || (!old_fx.Trim().Equals("")&&(old_fx.Equals(tB_fjrb.Text.Trim())&&!(old_fx_sl-decimal.Parse(tB_lzfs.Text.Trim())==0)))))
                    //{
                    //    if (common_file.common_app.message_box_show_select(common_file.common_app.message_title, "房型房间信息有更改,是否要提示发送短信给客人?"))
                    //    {
                    //        if (judge_add_edit.Equals(common_file.common_app.get_edit) || judge_add_edit.Equals(common_file.common_app.get_add))//修改当前的
                    //        {
                    //            dx_fs = true;
                    //            //Common_Qyddj.hy_yd_dx_tx(lsbh, tB_lzfs.Text.Remove(tB_lzfs.Text.LastIndexOf('.')), tB_fjrb.Text, false, Qskdj_fjrb_id);
                    //        }
                    //    }
                    //}



                    common_file.common_app.get_czsj();
                    url += "Qyddj/Qyddj_app.asmx";
                    object[] args = new object[26];
                    args[0] = Qskdj_fjrb_id;
                    args[1] = common_file.common_app.yydh;
                    args[2] = common_file.common_app.qymc;
                    args[3] = this.lsbh;
                    args[7] = tB_fjrb.Text.Trim().Replace("'", "_");
                    args[8] = tB_fjbh.Text.Trim().Replace("'", "_");
                    if (tB_lzfs.Text.Trim() == "")
                    {
                        args[11] = 1;
                    }
                    else
                    {
                        args[11] = Convert.ToDecimal(tB_lzfs.Text.Trim().Replace("'", "_"));
                    }
                    args[12] = cB_shqh.Text.Trim().Replace("'", "_");
                    if (yhbl == 0)
                    {
                        yhbl = 1;
                    }
                    args[13] = decimal.Parse(common_file.common_sswl.Round_sswl(double.Parse(tB_fjjg.Text.Trim().Replace("'", "_")), common_file.common_sswl.sswl_ws, common_file.common_sswl.selectMode_sel).ToString());
                    args[14] = decimal.Parse(common_file.common_sswl.Round_sswl(double.Parse(tB_fjjg.Text.Trim().Replace("'", "_")) * double.Parse(yhbl.ToString()), common_file.common_sswl.sswl_ws, common_file.common_sswl.selectMode_sel).ToString());
                    args[15] = tB_yh.Text.Trim().Replace("'", "_");
                    args[16] = yhbl;
                    args[17] = tB_bz.Text.Trim().Replace("'", "_");
                    args[18] = common_file.common_app.czy;
                    args[19] = DateTime.Now;
                    args[20] = common_file.common_app.chinese_edit;
                    args[22] = judge_add_edit;
                    args[23] = common_file.common_app.xxzs;
                    args[24] = cB_fjbm.Text.Trim().Replace("'", "_");
                    args[25] = 0;
                    if (tB_jcje.Text.Trim() != "")
                    {
                        args[25] = decimal.Parse(common_file.common_sswl.Round_sswl(double.Parse(tB_jcje.Text.Trim().Replace("'", "_")), common_file.common_sswl.sswl_ws, common_file.common_sswl.selectMode_sel).ToString());
                    }
                    //由于这里在fjrb表里面的记录会被删除掉,所以当找不到时改用主单记录里面的信息
                    if (B_Qskyd_fjrb.GetModelList("lsbh='" + this.lsbh + "'").Count > 0)
                    {
                        M_Qskyd_fjrb = B_Qskyd_fjrb.GetModelList("lsbh='" + this.lsbh + "'")[0];
                        args[4]      = M_Qskyd_fjrb.krxm;
                        args[5]      = M_Qskyd_fjrb.sktt;
                        args[6]      = M_Qskyd_fjrb.yddj;
                        args[9]      = M_Qskyd_fjrb.ddsj;
                        args[10]     = M_Qskyd_fjrb.lksj;
                        args[21]     = M_Qskyd_fjrb.yddj;//有三种状态,一种预订、一种登记、一种预订转登记
                    }
                    //如果找不到当前临时编号在fjrb表里面对应的记录,直接找lsbh对应的主单记录
                    else
                    {
                        M_qskyd_mainrecord_temp = B_qskyd_mainrecord_temp.GetModelList("lsbh='" + this.lsbh + "'")[0];
                        args[4]  = M_qskyd_mainrecord_temp.krxm;
                        args[5]  = M_qskyd_mainrecord_temp.sktt;
                        args[6]  = M_qskyd_mainrecord_temp.yddj;
                        args[9]  = M_qskyd_mainrecord_temp.ddsj;
                        args[10] = M_qskyd_mainrecord_temp.lksj;
                        args[21] = M_qskyd_mainrecord_temp.yddj;//有三种状态,一种预订、一种登记、一种预订转登记
                    }

                    if (judge_add_edit == common_file.common_app.get_edit)
                    {
                        if (Qskdj_fjrb_id != "")
                        {
                            M_Qskyd_fjrb = B_Qskyd_fjrb.GetModel(int.Parse(Qskdj_fjrb_id));
                            if (M_Qskyd_fjrb != null)
                            {
                                if (M_Qskyd_fjrb.fjbh != "")
                                {
                                    if (decimal.Parse(args[11].ToString()) > 1)
                                    {
                                        common_file.common_app.Message_box_show(common_file.common_app.message_title, "对不起,已经排房的记录不能直接修改房数!");
                                        return;
                                    }
                                }
                            }
                        }
                    }



                    //先判断是否超排房
                    if (judge_kyfs(M_Qskyd_fjrb.krxm, tB_fjbh.Text, M_Qskyd_fjrb.lsbh) == true)
                    {
                        Hotel_app.Server.Qyddj.Qskyd_fjrb_add_edd_delete_1 Qskyd_fjrb_add_edit_delete_services = new Hotel_app.Server.Qyddj.Qskyd_fjrb_add_edd_delete_1();

                        string result = Qskyd_fjrb_add_edit_delete_services.Qskyd_fjrb_add_edit_delete_app_1(args[0].ToString(), args[1].ToString(), args[2].ToString(), args[3].ToString(), args[4].ToString(), args[5].ToString(), args[6].ToString(), args[7].ToString(), args[8].ToString(), DateTime.Parse(args[9].ToString()),
                                                                                                             DateTime.Parse(args[10].ToString()), decimal.Parse(args[11].ToString()), args[12].ToString(), Decimal.Parse(args[13].ToString()), Decimal.Parse(args[14].ToString()), args[15].ToString(), Decimal.Parse(args[16].ToString()), args[17].ToString(), args[18].ToString(), DateTime.Parse(args[19].ToString()), args[20].ToString(), args[21].ToString(),
                                                                                                             args[22].ToString(), args[23].ToString(), args[24].ToString(), Decimal.Parse(args[25].ToString()));



                        //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Qskyd_fjrb_add_edit_delete_app_1", args);
                        if (result.ToString() == common_file.common_app.get_suc)
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "保存成功!");
                            this.DialogResult = DialogResult.OK;

                            //成功后,调用短信发送
                            if (dx_fs)//如果选择发送短信
                            {
                                BLL.Common B_common = new Hotel_app.BLL.Common();
                                DataSet    ds_dx_zd = B_common.GetList(" select  *  from   View_Qskzd  ", " lsbh='" + lsbh + "'  and    yddj='" + common_file.common_yddj.yddj_yd + "'  and    krsj!=''    and   main_sec='" + common_file.common_app.main_sec_main + "'   ");
                                string     phoneNo = ""; bool check_phone = false;
                                if (ds_dx_zd != null && ds_dx_zd.Tables[0].Rows.Count > 0)
                                {
                                    phoneNo     = ds_dx_zd.Tables[0].Rows[0]["krsj"].ToString();
                                    check_phone = System.Text.RegularExpressions.Regex.IsMatch(phoneNo, @"^[1]+[3,4,5,6,8]+\d{9}");
                                    if (!check_phone)
                                    {
                                        common_file.common_app.Message_box_show(common_file.common_app.message_title, "当前预订人的手机号不正确,请修正预订人的手机号系统才能即时发送短信提醒!");
                                    }
                                }



                                BLL.Common B_common00 = new Hotel_app.BLL.Common();
                                DataSet    ds_dx      = B_common00.GetList(" select * from  Qskyd_fjrb  ", "  id>=0  and    lsbh in (select lsbh from Qskyd_mainrecord  where lsbh='" + lsbh + "'  and  yddj='" + common_file.common_yddj.yddj_yd + "')  ");
                                if (ds_dx != null && ds_dx.Tables[0].Rows.Count > 0)
                                {
                                    StringBuilder sb = new StringBuilder();
                                    for (int i = 0; i < ds_dx.Tables[0].Rows.Count; i++)
                                    {
                                        if (ds_dx.Tables[0].Rows[i]["fjrb"].ToString().Length > 0)
                                        {
                                            if (sb.ToString().Length > 0)
                                            {
                                                sb.Append(",");
                                            }
                                            string lzfs_fs = ds_dx.Tables[0].Rows[i]["lzfs"].ToString();
                                            try
                                            {
                                                lzfs_fs = lzfs_fs.Remove(lzfs_fs.LastIndexOf('.'));
                                            }
                                            catch
                                            {
                                                //lzfs_fs=lzfs_fs;
                                            }
                                            sb.Append(DateTime.Parse(ds_dx.Tables[0].Rows[i]["ddsj"].ToString()).ToShortDateString() + ds_dx.Tables[0].Rows[i]["fjrb"].ToString() + lzfs_fs + "间");
                                        }
                                    }
                                    if (!sb.ToString().Equals("") && check_phone)
                                    {
                                        //Hotel_app.Hhygl_app.Hhygl_app Hhygl_app_services_new = new Hotel_app.Server.Hhygl_app.Hhygl_app();
                                        //Hhygl_app_services_new.Url = common_file.common_app.service_url + "Hhygl/Hhygl_app.asmx";
                                        Hotel_app.Server.Hhygl.Hhygl_verifyCode Hhygl_verifyCode_services = new Hotel_app.Server.Hhygl.Hhygl_verifyCode();

                                        string ss = Hhygl_verifyCode_services.Hhygl_SendMsm(phoneNo, sb.ToString(), common_file.common_app.yydh, "", common_file.common_hyAction.hy_Action_ydxg, "", "", "", "", "", "", common_file.common_app.xxzs);
                                        common_file.common_app.Message_box_show(common_file.common_app.message_title, "系统修改当前会员的预订单成功,并己经自动将房型及房数以短信告知客人!");
                                        //MessageBox.Show(sb.ToString());
                                    }
                                }
                            }


                            common_file.common_form.Qskdj_new.lsbh = this.lsbh;
                            common_file.common_form.Qskdj_new.refresh_app();
                        }
                        else
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, result.ToString());
                        }
                    }
                }
                #endregion
            }

            if (yddj_type == common_file.common_app.yddj_type_group)
            {
                if (this.tB_lzfs.Text.Trim() == "")
                {
                    common_file.common_app.Message_box_show(common_file.common_app.message_title, "请填写入住房数!");
                    tB_lzfs.Focus();
                    return;
                }


                common_file.common_app.get_czsj();
                #region 处理团体的部分_初始房态(fjbh='')
                if (tB_fjbh.Text.Trim() == "")
                {
                    if (tB_fjrb.Text.Trim() == "")//是否有选房型
                    {
                        common_file.common_app.Message_box_show(common_file.common_app.message_title, "请选择房型!");
                        tB_fjrb.Focus();
                        return;
                    }
                    if (this.tB_lzfs.Text.Trim() == "" || decimal.Parse(this.tB_lzfs.Text.Trim()) < 0)//是否有写入住房数
                    {
                        common_file.common_app.Message_box_show(common_file.common_app.message_title, "请填写入住房数!");
                        tB_lzfs.Focus();
                        return;
                    }
                    //新增时要先判断(第一是否有空记录,第二步要判断是否有存在相同类别未排房的记录)
                    if (judge_add_edit == common_file.common_app.get_add)
                    {
                        if (B_Qskyd_fjrb.GetModelList("lsbh='" + lsbh + "'  and  fjbh='' and  fjrb=''").Count > 0)
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "存在空记录,请先修改!");
                            return;
                        }
                        if (B_Qskyd_fjrb.GetModelList("lsbh='" + lsbh + "'  and fjbh=''  and   fjrb='" + this.tB_fjrb.Text.Trim() + "'").Count > 0)
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "同种房类以经存在,请直接修改数量!");
                            return;
                        }
                    }
                    //修改时,判断,修改后的类型是否当前以经存在
                    if (judge_add_edit == common_file.common_app.get_edit)
                    {
                        if (B_Qskyd_fjrb.GetModelList("lsbh='" + lsbh + "'  and fjbh=''  and   fjrb='" + this.tB_fjrb.Text.Trim() + "' and id!='" + Qskdj_fjrb_id + "'").Count > 0)
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "修改的房间类型以经存在,请直接修改数量");
                            return;
                        }
                    }
                    common_file.common_app.get_czsj();
                    url += "Qyddj/Qyddj_app.asmx";
                    object[] args = new object[26];
                    args[0]  = Qskdj_fjrb_id;
                    args[1]  = common_file.common_app.yydh;
                    args[2]  = common_file.common_app.qymc;
                    args[3]  = this.lsbh;
                    args[4]  = M_Qskyd_fjrb.krxm;
                    args[5]  = M_Qskyd_fjrb.sktt;
                    args[6]  = M_Qskyd_fjrb.yddj;
                    args[7]  = tB_fjrb.Text.Trim().Replace("'", "_");
                    args[8]  = "";
                    args[9]  = M_Qskyd_fjrb.ddsj;
                    args[10] = M_Qskyd_fjrb.lksj;
                    if (tB_lzfs.Text.Trim() == "")
                    {
                        args[11] = 0;
                    }
                    else
                    {
                        args[11] = Convert.ToDecimal(tB_lzfs.Text.Trim().Replace("'", "_"));
                    }
                    args[12] = cB_shqh.Text.Trim().Replace("'", "_");
                    args[13] = decimal.Parse(common_file.common_sswl.Round_sswl(double.Parse(tB_fjjg.Text.Trim().Replace("'", "_")), common_file.common_sswl.sswl_ws, common_file.common_sswl.selectMode_sel).ToString());
                    args[14] = decimal.Parse(common_file.common_sswl.Round_sswl(double.Parse(tB_fjjg.Text.Trim().Replace("'", "_")) * double.Parse(yhbl.ToString()), common_file.common_sswl.sswl_ws, common_file.common_sswl.selectMode_sel).ToString());
                    args[15] = tB_yh.Text.Trim().Replace("'", "_");
                    args[16] = yhbl;
                    args[17] = tB_bz.Text.Trim().Replace("'", "_");
                    args[18] = common_file.common_app.czy;
                    args[19] = DateTime.Now;
                    args[20] = common_file.common_app.chinese_edit;
                    args[21] = M_Qskyd_fjrb.yddj;//有三种状态,一种预订、一种登记、一种预订转登记
                    args[22] = judge_add_edit;
                    args[23] = common_file.common_app.xxzs;
                    args[24] = cB_fjbm.Text.Trim().Replace("'", "_");
                    args[25] = 0;
                    if (tB_jcje.Text.Trim() != "")
                    {
                        args[25] = decimal.Parse(common_file.common_sswl.Round_sswl(double.Parse(tB_jcje.Text.Trim().Replace("'", "_")), common_file.common_sswl.sswl_ws, common_file.common_sswl.selectMode_sel).ToString());
                    }
                    if (judge_add_edit == common_file.common_app.get_edit)
                    {
                        if (M_Qskyd_fjrb.fjbh != "")
                        {
                            if (decimal.Parse(args[11].ToString()) > 1)
                            {
                                common_file.common_app.Message_box_show(common_file.common_app.message_title, "对不起,已经排房的记录不能直接修改房数!");
                                return;
                            }
                        }
                    }



                    //先判断是否超排房
                    if (judge_kyfs(args[4].ToString(), "", args[3].ToString()) == true)
                    {
                        Hotel_app.Server.Qyddj.Qskyd_fjrb_add_edit_delete Qskyd_fjrb_add_edit_delete_services = new Hotel_app.Server.Qyddj.Qskyd_fjrb_add_edit_delete();

                        string result = Qskyd_fjrb_add_edit_delete_services.Qskyd_fjrb_add_edit_delete_app(args[0].ToString(), args[1].ToString(), args[2].ToString(), args[3].ToString(), args[4].ToString(), args[5].ToString(), args[6].ToString(), args[7].ToString(), args[8].ToString(), DateTime.Parse(args[9].ToString()),
                                                                                                           DateTime.Parse(args[10].ToString()), Decimal.Parse(args[11].ToString()), args[12].ToString(), Decimal.Parse(args[13].ToString()), Decimal.Parse(args[14].ToString()), args[15].ToString(), Decimal.Parse(args[16].ToString()), args[17].ToString(), args[18].ToString(), DateTime.Parse(args[19].ToString()), args[20].ToString(), args[21].ToString(), args[22].ToString(), args[23].ToString(), args[24].ToString(), Decimal.Parse(args[25].ToString()));
                        //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Qskyd_fjrb_add_edit_delete_app", args);

                        if (result.ToString() == common_file.common_app.get_suc)
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "保存成功!");
                            this.DialogResult = DialogResult.OK;
                            common_file.common_form.Qttdj_new.lsbh = this.lsbh;
                            //common_file.common_form.Qttdj_new.add_edit = "";
                            common_file.common_form.Qttdj_new.RefreshApp();
                        }
                        else
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, result.ToString());
                        }
                    }
                }

                #endregion
            }
            Cursor.Current = Cursors.Default;
        }
コード例 #6
0
        public string Qskyd_fjrb_add_edit_delete_app_1(string id, string yydh, string qymc, string lsbh, string krxm, string sktt, string yddj, string fjrb, string fjbh, DateTime ddsj, DateTime lksj, Decimal lzfs, string shqh, decimal fjjg, decimal sjfjjg, string yh, decimal yhbl, string bz, string czy, DateTime czsj,
                                                       string cznr, string zyzt, string add_edit_delete, string xxzs, string fjbm, decimal jcje)
        {
            string s = common_file.common_app.get_failure;

            BLL.Qskyd_fjrb       B_temp             = new Hotel_app.BLL.Qskyd_fjrb();
            Model.Qskyd_fjrb     M_Qskyd_fjrb       = new Hotel_app.Model.Qskyd_fjrb();
            Ffjzt.Flfsz_add_edit Flfsz_add_edit_new = new Hotel_app.Server.Ffjzt.Flfsz_add_edit();
            BLL.Common           B_Common           = new Hotel_app.BLL.Common();
            DataSet ds = new DataSet();
            int     id_temp = 0; int id_temp2 = 0;
            int     j_temp = 1;
            string  lsbh_News = "";
            string  ddbh_News = "";
            string  lfbh_News = ""; int i_1 = 0;
            string  old_fjbh = "";

            BLL.Flfsz   B_flfsz = new Hotel_app.BLL.Flfsz();
            Model.Flfsz M_flfsz = new Hotel_app.Model.Flfsz();
            //if (sktt == common_file.common_sktt.sktt_sk || sktt == common_file.common_sktt.sktt_cz)
            {
                #region 预订新增房间类型
                //1.新增有房号的主单
                //2.修改新增主单里的房类信息把fjbh加进去并把lzfs设为1.
                //3.设置联房,要先去查看原来的临时编号有没有存在联房,有就不再重新生成联房编号,直接修改。
                //4.修改fjrb表,把没有房号的LZFS扣除1同时加到联房里,再修改现有主单里的房类信息

                if (add_edit_delete == common_file.common_app.get_add)
                {
                    if (yddj == common_file.common_yddj.yddj_yd)
                    {
                        if (lzfs > 1 && fjbh != "")
                        {
                            //新增客人主单
                            ds = B_Qskyd_mainrecord.GetList("lsbh='" + lsbh + "'");
                            if (ds != null && ds.Tables[0].Rows.Count > 0)
                            {
                                M_Qskyd_mainrecord = B_Qskyd_mainrecord.GetModel(Convert.ToInt32(ds.Tables[0].Rows[0]["id"].ToString()));

                                lsbh_News = common_file.common_ddbh.ddbh("skyd", "skyddate", "skydcounter", 6);
                                ddbh_News = common_file.common_ddbh.ddbh("skyd", "skyddate", "skydcounter", 6);
                                s         = common_file_server.Common_pl_Qskyd_mainRecord_add.Pladd(yydh, qymc, lsbh, lsbh_News, ddbh_News, czy, czsj.ToString(), "", "");//根据lsbh读起主单信息,添加一条有房号的记录。

                                if (s == common_file.common_app.get_suc)
                                {
                                    s = common_file.common_app.get_failure;
                                    //修改新增主单里的房类信息把fjbh加进去并把lzfs设为1.

                                    ds = B_temp.GetList("lsbh='" + lsbh_News + "'");
                                    if (ds != null && ds.Tables[0].Rows.Count > 0)
                                    {
                                        Model.Qskyd_fjrb M_temp = B_temp.GetModel(Convert.ToInt32(ds.Tables[0].Rows[0]["id"]));
                                        M_temp.fjbh   = fjbh;
                                        M_temp.fjrb   = fjrb;
                                        M_temp.fjjg   = fjjg;
                                        M_temp.sjfjjg = sjfjjg;
                                        M_temp.yh     = yh;
                                        M_temp.yhbl   = yhbl;
                                        M_temp.shqh   = shqh;
                                        M_temp.bz     = bz;
                                        M_temp.lzfs   = 1;
                                        M_temp.fjbm   = fjbm;
                                        M_temp.jcje   = jcje;
                                        if (B_temp.Update(M_temp))
                                        {
                                            Qskyd_fjrb_add_edit_delete_new.add_fjbh_yd_fjzt(M_temp.lsbh, M_temp.fjbh, M_temp.sktt, czsj, czy, xxzs);



                                            #region 当前主单以前没有联房过()
                                            if (B_flfsz.GetModelList("lsbh='" + lsbh + "'").Count == 0)
                                            {
                                                //生成新的联房编号
                                                lfbh_News = common_file.common_ddbh.ddbh("lf", "lfdate", "lfcounter", 6);

                                                s = Flfsz_add_edit_new.Flfsz_add_edit_delete("", yydh, qymc, lfbh_News, lsbh_News, fjbh, krxm, sktt, yddj, czy, czsj.ToString(), common_file.common_app.shlz, common_file.common_app.get_add, xxzs);


                                                if (s == common_file.common_app.get_suc)
                                                {
                                                    //主单增加到联房,增加新的一条无房号的记录到fjrb表
                                                    lzfs = lzfs - 1;
                                                    if (Qskyd_fjrb_add_edit_delete_new.Qskyd_fjrb_add_edit_delete_app(id.ToString(), yydh, qymc, lsbh, krxm, sktt, yddj, fjrb, "", ddsj, lksj, lzfs, shqh, fjjg, sjfjjg, yh, yhbl, bz, czy, DateTime.Now, cznr, zyzt, common_file.common_app.get_add, xxzs, fjbm, jcje) == common_file.common_app.get_suc)
                                                    {
                                                        //新增临时编号到联房里面

                                                        string  fjbh_0  = "";
                                                        DataSet DS_temp = B_Common.GetList("select fjbh from Qskyd_fjrb", "lsbh='" + lsbh + "' and fjbh<>''");
                                                        if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
                                                        {
                                                            fjbh_0 = DS_temp.Tables[0].Rows[0]["fjbh"].ToString();
                                                        }

                                                        s = Flfsz_add_edit_new.Flfsz_add_edit_delete("", yydh, qymc, lfbh_News, lsbh, fjbh_0, krxm, sktt, yddj, czy, czsj.ToString(), common_file.common_app.shlz, common_file.common_app.get_add, xxzs);


                                                        //M_flfsz.yydh = yydh;
                                                        //M_flfsz.qymc = qymc;
                                                        //M_flfsz.lsbh = lsbh;
                                                        //M_flfsz.fjbh = "";
                                                        //M_flfsz.lfbh = lfbh_News;
                                                        //M_flfsz.krxm = krxm;
                                                        //M_flfsz.sktt = sktt;
                                                        //M_flfsz.yddj = yddj;
                                                        //M_flfsz.czy = czy;
                                                        //M_flfsz.czsj = czsj;
                                                        //if (B_flfsz.Add(M_flfsz) > 0)
                                                        //{
                                                        //    s = common_file.common_app.get_suc;
                                                        //}
                                                        //else
                                                        //{
                                                        //    return s;
                                                        //}
                                                    }
                                                    else
                                                    {
                                                        return(s);
                                                    }
                                                }
                                                else
                                                {
                                                    return(s);
                                                }
                                            }
                                            #endregion

                                            #region 当前主单有联房过
                                            else
                                            {
                                                //直接把新增的一条加到联房表,fjbh不存在的一条不管
                                                lfbh_News = B_flfsz.GetModelList("lsbh='" + lsbh + "'")[0].lfbh;

                                                s = Flfsz_add_edit_new.Flfsz_add_edit_delete("", yydh, qymc, lfbh_News, lsbh_News, fjbh, krxm, sktt, yddj, czy, czsj.ToString(), common_file.common_app.shlz, common_file.common_app.get_add, xxzs);
                                                if (s == common_file.common_app.get_suc)
                                                {
                                                    //主单增加到联房,增加新的一条无房号的记录到fjrb表
                                                    lzfs = lzfs - 1;
                                                    if (Qskyd_fjrb_add_edit_delete_new.Qskyd_fjrb_add_edit_delete_app(id.ToString(), yydh, qymc, lsbh, krxm, sktt, yddj, fjrb, "", ddsj, lksj, lzfs, shqh, fjjg, sjfjjg, yh, yhbl, bz, czy, DateTime.Now, cznr, zyzt, common_file.common_app.get_add, xxzs, fjbm, jcje) == common_file.common_app.get_suc)
                                                    {
                                                        s = common_file.common_app.get_suc;
                                                    }
                                                    else
                                                    {
                                                        return(s);
                                                    }
                                                }
                                                else
                                                {
                                                    return(s);
                                                }
                                            }
                                            #endregion
                                        }
                                        else
                                        {
                                            return(s);
                                        }
                                    }
                                }
                                else
                                {
                                    return(s);
                                }
                            }
                        }//if (lzfs > 1 && fjbh != "")
                        else
                        {
                            j_temp = 1;
                            //如果原来已经有等一条已经排房的记录,新的(增加修改记录)房型一样且如果仍为1时的情况
                            if (B_temp.GetModelList("lsbh='" + lsbh + "' and fjrb='" + fjrb + "' and fjbh<>'' ").Count > 0)
                            {
                                j_temp = 3;
                            }
                            if (j_temp != 3)
                            {
                                //如果原来已经有等一条已经排房的记录,新的(增加修改记录)房型如果不一样且如果仍为1时的情况
                                #region 判断当前的临时编号对应的lzfs是否为1,并在fjrb表有多条记录的时候
                                if (B_temp.GetModelList("lsbh='" + lsbh + "' and fjrb<>'" + fjrb + "' and fjrb<>'' ").Count > 0)
                                {
                                    j_temp = 3;
                                }
                                #endregion

                                #region 只有一条记录的时候,直接修改fjrb,并加到联房表
                                else
                                {
                                    if (Qskyd_fjrb_add_edit_delete_new.Qskyd_fjrb_add_edit_delete_app(id.ToString(), yydh, qymc, lsbh, krxm, sktt, yddj, fjrb, fjbh, ddsj, lksj, lzfs, shqh, fjjg, sjfjjg, yh, yhbl, bz, czy, czsj, cznr, zyzt, add_edit_delete, xxzs, fjbm, jcje) == common_file.common_app.get_suc)
                                    {
                                        s = common_file.common_app.get_suc;
                                    }
                                    else
                                    {
                                        return(s);
                                    }
                                }
                            }
                            if (j_temp == 3)//输入房数为1时的判断,且原来有记录的情况
                            {
                                if (fjbh != "")
                                {
                                    //找到当前房间类型为1,而且还没有排房号的那条记录
                                    //M_Qskyd_fjrb = B_temp.GetModelList("lsbh='" + lsbh + "' and  fjrb='" + fjrb + "'  and  lzfs=1  and fjbh=''")[0];
                                    //得到主单的信息:
                                    lsbh_News = common_file.common_ddbh.ddbh("skyd", "skyddate", "skydcounter", 6);
                                    ddbh_News = common_file.common_ddbh.ddbh("skyd", "skyddate", "skydcounter", 6);
                                    //通过当前的主单信息新增一条新的记录
                                    if (common_file_server.Common_pl_Qskyd_mainRecord_add.Pladd(yydh, qymc, lsbh, lsbh_News, ddbh_News, czy, czsj.ToString(), "", "") == common_file.common_app.get_suc)
                                    {
                                        #region //修改fjrb表里当前生成这条记录的房间信息
                                        id_temp2 = GetModel("", lsbh_News).id;
                                        if (Qskyd_fjrb_add_edit_delete_new.Qskyd_fjrb_add_edit_delete_app(id_temp2.ToString(), yydh, qymc, lsbh_News, krxm, sktt, yddj, fjrb, fjbh, ddsj, lksj, lzfs, shqh, fjjg, sjfjjg, yh, yhbl, bz, czy, czsj, "自动新增", zyzt, common_file.common_app.get_edit, xxzs, fjbm, jcje) == common_file.common_app.get_suc)
                                        {
                                            if (lf_GetResult(lsbh, qymc, lsbh_News, yydh, fjbh, krxm, sktt, yddj, czy, czsj, xxzs))
                                            {
                                                s = common_file.common_app.get_suc;
                                            }
                                        }
                                        #endregion
                                    }
                                }
                                else
                                {
                                    if (Qskyd_fjrb_add_edit_delete_new.Qskyd_fjrb_add_edit_delete_app(id.ToString(), yydh, qymc, lsbh, krxm, sktt, yddj, fjrb, fjbh, ddsj, lksj, lzfs, shqh, fjjg, sjfjjg, yh, yhbl, bz, czy, czsj, cznr, zyzt, add_edit_delete, xxzs, fjbm, jcje) == common_file.common_app.get_suc)
                                    {
                                        s = common_file.common_app.get_suc;
                                    }
                                    else
                                    {
                                        return(s);
                                    }
                                }
                            }



                            #endregion
                        }
                    }
                }
                #endregion
                #region 预订修改房间类型
                else
                if (add_edit_delete == common_file.common_app.get_edit)
                {
                    if (yddj == common_file.common_yddj.yddj_yd)
                    {
                        #region  新增主单lzfs > 1 && fjbh != ""

                        if (lzfs > 1 && fjbh != "")
                        {
                            //新增主单
                            //修改新增主单里的房类信息
                            //设置联房,要先去查看原来的临时编号有没有存在联房,有就不再重新生成联房编号

                            //把没有房号的LZFS扣除1同里加到联房里,再修改现有主单里的房类信息

                            ds = B_Qskyd_mainrecord.GetList("lsbh='" + lsbh + "'");
                            if (ds != null && ds.Tables[0].Rows.Count > 0)
                            {
                                M_Qskyd_mainrecord = B_Qskyd_mainrecord.GetModel(Convert.ToInt32(ds.Tables[0].Rows[0]["id"].ToString()));

                                lsbh_News = common_file.common_ddbh.ddbh("skyd", "skyddate", "skydcounter", 6);
                                ddbh_News = common_file.common_ddbh.ddbh("skyd", "skyddate", "skydcounter", 6);

                                s = common_file_server.Common_pl_Qskyd_mainRecord_add.Pladd(yydh, qymc, lsbh, lsbh_News, ddbh_News, czy, czsj.ToString(), "", "");

                                if (s == common_file.common_app.get_suc)
                                {
                                    s = common_file.common_app.get_failure;
                                    //修改新增主单里的房类信息把fjbh加进去
                                    ds = B_temp.GetList("lsbh='" + lsbh_News + "'");
                                    if (ds != null && ds.Tables[0].Rows.Count > 0)
                                    {
                                        //修改新增主单的Qskyd_fjrb表的fjbh并加到联房
                                        Model.Qskyd_fjrb M_temp = B_temp.GetModel(Convert.ToInt32(ds.Tables[0].Rows[0]["id"]));
                                        M_temp.fjbh   = fjbh;
                                        M_temp.fjrb   = fjrb;
                                        M_temp.fjjg   = fjjg;
                                        M_temp.sjfjjg = sjfjjg;
                                        M_temp.yh     = yh;
                                        M_temp.yhbl   = yhbl;
                                        M_temp.shqh   = shqh;
                                        M_temp.bz     = bz;
                                        M_temp.lzfs   = 1;
                                        M_temp.fjbm   = fjbm;
                                        M_temp.jcje   = jcje;
                                        //M_temp.id=Convert.ToInt32(ds.Tables[0].Rows[0]["id"]);
                                        #region                                                                       //以前没有联房的处理节
                                        if (B_flfsz.GetModelList("lsbh='" + lsbh + "'").Count == 0)                   //以前没有联房
                                        {
                                            lfbh_News = common_file.common_ddbh.ddbh("lf", "lfdate", "lfcounter", 6); //

                                            s = Flfsz_add_edit_new.Flfsz_add_edit_delete("", yydh, qymc, lfbh_News, lsbh_News, fjbh, krxm, sktt, yddj, czy, czsj.ToString(), common_file.common_app.shlz, common_file.common_app.get_add, xxzs);



                                            //增加到联房,修改新增的主单fjrb表里的fjbh并把lzfs-1;并增加到联房)

                                            if (B_temp.Update(M_temp) && s == common_file.common_app.get_suc)
                                            {
                                                Qskyd_fjrb_add_edit_delete_new.add_fjbh_yd_fjzt(M_temp.lsbh, M_temp.fjbh, M_temp.sktt, czsj, czy, xxzs);



                                                ds  = B_temp.GetList("lsbh='" + lsbh + "'  and  fjrb='' and id='" + id.ToString() + "'");
                                                i_1 = 5;
                                                if (ds != null && ds.Tables[0].Rows.Count > 0)
                                                {
                                                    i_1 = 6;
                                                }
                                                else
                                                {
                                                    i_1 = 5;
                                                    ds  = B_temp.GetList("lsbh='" + lsbh + "'  and  fjrb<>''  and id='" + id.ToString() + "'");
                                                    if (ds != null && ds.Tables[0].Rows.Count > 0)
                                                    {
                                                        if (ds.Tables[0].Rows[0]["fjrb"].ToString() == fjrb)
                                                        {
                                                            i_1 = 5;
                                                        }
                                                        else
                                                        {
                                                            i_1 = 7;
                                                        }
                                                    }
                                                }


                                                if (ds != null && ds.Tables[0].Rows.Count > 0)
                                                {
                                                    id_temp      = Convert.ToInt32(ds.Tables[0].Rows[0]["id"]);
                                                    M_Qskyd_fjrb = B_temp.GetModel(id_temp);
                                                }

                                                if (i_1 == 5 || i_1 == 6 || i_1 == 7)
                                                {
                                                    M_Qskyd_fjrb.lzfs = lzfs - 1;
                                                    M_Qskyd_fjrb.czy  = czy;
                                                    M_Qskyd_fjrb.czsj = DateTime.Now;
                                                    M_Qskyd_fjrb.cznr = common_file.common_app.get_edit;
                                                    if (i_1 == 6 || i_1 == 7)
                                                    {
                                                        M_Qskyd_fjrb.fjrb = fjrb;
                                                        if (i_1 == 6)
                                                        {
                                                            M_Qskyd_fjrb.shqh   = shqh;
                                                            M_Qskyd_fjrb.fjjg   = fjjg;  //decimal.Parse(common_file.common_get_fjjg.get_fjjg(fjrb));
                                                            M_Qskyd_fjrb.sjfjjg = sjfjjg;
                                                            M_Qskyd_fjrb.yh     = yh;
                                                            M_Qskyd_fjrb.yhbl   = yhbl;
                                                            M_Qskyd_fjrb.bz     = bz;
                                                            M_Qskyd_fjrb.fjbm   = fjbm;
                                                            M_Qskyd_fjrb.bz     = bz;
                                                        }
                                                    }
                                                }
                                                if (B_temp.Update(M_Qskyd_fjrb))     //无房间编号的房类主单也加到联房表里面
                                                {
                                                    s = Flfsz_add_edit_new.Flfsz_add_edit_delete("", yydh, qymc, lfbh_News, lsbh, "", krxm, sktt, yddj, czy, czsj.ToString(), common_file.common_app.shlz, common_file.common_app.get_add, xxzs);
                                                }
                                                else
                                                {
                                                    return(s);
                                                }
                                            }
                                            else
                                            {
                                                return(s);
                                            }
                                        }

                                        #endregion

                                        #region 以前有联房
                                        else
                                        {
                                            //读出联房信息
                                            lfbh_News = B_flfsz.GetModelList("lsbh='" + lsbh + "'")[0].lfbh;
                                            //将新增主单加到联房表里面  同时  修改新增的一条fjrb表里面的信息
                                            M_Qskyd_fjrb = B_temp.GetModelList("lsbh='" + lsbh_News + "'")[0];
                                            //相同信息
                                            M_Qskyd_fjrb.fjrb = fjrb;
                                            M_Qskyd_fjrb.fjbh = fjbh;
                                            M_Qskyd_fjrb.cznr = common_file.common_app.get_edit;
                                            M_Qskyd_fjrb.czsj = DateTime.Now;
                                            M_Qskyd_fjrb.lzfs = 1;
                                            M_Qskyd_fjrb.fjjg = fjjg;
                                            M_Qskyd_fjrb.yh   = yh;
                                            M_Qskyd_fjrb.yhbl = yhbl;
                                            M_Qskyd_fjrb.shqh = shqh;
                                            M_Qskyd_fjrb.bz   = bz;
                                            M_Qskyd_fjrb.fjbm = fjbm;
                                            M_Qskyd_fjrb.jcje = jcje;


                                            s = Flfsz_add_edit_new.Flfsz_add_edit_delete("", yydh, qymc, lfbh_News, lsbh_News, fjbh, krxm, sktt, yddj, czy, czsj.ToString(), common_file.common_app.shlz, common_file.common_app.get_add, xxzs);



                                            if (s == common_file.common_app.get_suc && B_temp.Update(M_Qskyd_fjrb))
                                            {
                                                Qskyd_fjrb_add_edit_delete_new.add_fjbh_yd_fjzt(M_Qskyd_fjrb.lsbh, M_Qskyd_fjrb.fjbh, M_Qskyd_fjrb.sktt, czsj, czy, xxzs);


                                                //修改原来的fjrb表的信息

                                                //M_Qskyd_fjrb = B_temp.GetModelList("lsbh='" + lsbh + "' and fjrb='" + fjrb + "'")[0];

                                                M_Qskyd_fjrb        = B_temp.GetModel(int.Parse(id));
                                                M_Qskyd_fjrb.id     = int.Parse(id);
                                                M_Qskyd_fjrb.lzfs   = lzfs - 1;
                                                M_Qskyd_fjrb.fjrb   = fjrb;
                                                M_Qskyd_fjrb.fjjg   = fjjg;
                                                M_Qskyd_fjrb.sjfjjg = sjfjjg;
                                                M_Qskyd_fjrb.yh     = yh;
                                                M_Qskyd_fjrb.yhbl   = yhbl;
                                                M_Qskyd_fjrb.shqh   = shqh;
                                                M_Qskyd_fjrb.bz     = bz;
                                                M_Qskyd_fjrb.fjbm   = fjbm;
                                                M_Qskyd_fjrb.jcje   = jcje;
                                                if (B_temp.Update(M_Qskyd_fjrb))
                                                {
                                                    s = common_file.common_app.get_suc;
                                                }
                                                else
                                                {
                                                    return(s);
                                                }
                                            }
                                            else
                                            {
                                                return(s);
                                            }
                                        }
                                        #endregion
                                    }
                                }
                                else
                                {
                                    return(s);
                                }
                            }
                        }
                        #endregion


                        else
                        {
                            #region 判断当前的临时编号对应的lzfs是否为1,并在fjrb表有多条记录的时候

                            DataSet DS_temp_1;
                            DS_temp_1 = B_temp.GetList("id='" + id + "'");
                            if (DS_temp_1 != null && DS_temp_1.Tables[0].Rows.Count > 0)
                            {
                                old_fjbh = DS_temp_1.Tables[0].Rows[0]["fjbh"].ToString();
                            }
                            j_temp = 1;
                            //如果原来已经有等一条已经排房的记录,新的(增加修改记录)房型一样且如果仍为1时的情况
                            if (B_temp.GetModelList("lsbh='" + lsbh + "' and fjrb='" + fjrb + "' and fjbh<>'' ").Count > 0)
                            {
                                j_temp = 3;
                            }
                            if (j_temp != 3)
                            {
                                if (B_temp.GetModelList("lsbh='" + lsbh + "' and fjrb<>'" + fjrb + "' and fjrb<>'' ").Count > 0)
                                {
                                    j_temp = 3;

                                    if (old_fjbh == "" && fjbh != "")
                                    {
                                        if (B_temp.GetModelList("lsbh='" + lsbh + "' and fjrb<>'" + fjrb + "' and fjrb<>'' and fjbh='' ").Count > 0)
                                        {
                                            j_temp = 1;
                                        }
                                    }
                                }
                                #endregion
                                #region 只有一条记录的时候,直接修改fjrb,并加到联房表
                                else
                                {
                                    if (Qskyd_fjrb_add_edit_delete_new.Qskyd_fjrb_add_edit_delete_app(id.ToString(), yydh, qymc, lsbh, krxm, sktt, yddj, fjrb, fjbh, ddsj, lksj, lzfs, shqh, fjjg, sjfjjg, yh, yhbl, bz, czy, czsj, cznr, zyzt, add_edit_delete, xxzs, fjbm, jcje) == common_file.common_app.get_suc)
                                    {
                                        s = common_file.common_app.get_suc;
                                    }
                                    else
                                    {
                                        return(s);
                                    }
                                }
                                #endregion
                            }

                            if (old_fjbh != "")
                            {
                                j_temp = 1;
                            }
                            if (j_temp == 3)
                            {
                                if (fjbh != "")
                                {
                                    //找到当前房间类型为1,而且还没有排房号的那条记录
                                    //M_Qskyd_fjrb = B_temp.GetModelList("lsbh='" + lsbh + "' and  fjrb='" + fjrb + "'  and  lzfs=1  and fjbh=''")[0];
                                    //得到主单的信息:
                                    lsbh_News = common_file.common_ddbh.ddbh("skyd", "skyddate", "skydcounter", 6);
                                    ddbh_News = common_file.common_ddbh.ddbh("skyd", "skyddate", "skydcounter", 6);
                                    //通过当前的主单信息新增一条新的记录
                                    if (common_file_server.Common_pl_Qskyd_mainRecord_add.Pladd(yydh, qymc, lsbh, lsbh_News, ddbh_News, czy, czsj.ToString(), "", "") == common_file.common_app.get_suc)
                                    {
                                        #region     //修改fjrb表里当前生成这条记录的房间信息
                                        id_temp2 = GetModel("", lsbh_News).id;
                                        if (Qskyd_fjrb_add_edit_delete_new.Qskyd_fjrb_add_edit_delete_app(id_temp2.ToString(), yydh, qymc, lsbh_News, krxm, sktt, yddj, fjrb, fjbh, ddsj, lksj, lzfs, shqh, fjjg, sjfjjg, yh, yhbl, bz, czy, czsj, "自动新增", zyzt, common_file.common_app.get_edit, xxzs, fjbm, jcje) == common_file.common_app.get_suc)
                                        {
                                            //修改成功后,把当前原来fjrb表里面对应的那条记录删除
                                            if (GetModel(fjrb, lsbh) != null)
                                            {
                                                id_temp2 = int.Parse(id);
                                                if (B_temp.Delete(id_temp2))
                                                {
                                                    //删除对应记录成功后,把新生成的记录加到联房里
                                                    #region 判断当前的lsbh在不在在联房表里面,然后做相应处理
                                                    if (lf_GetResult(lsbh, qymc, lsbh_News, yydh, fjbh, krxm, sktt, yddj, czy, czsj, xxzs))
                                                    {
                                                        s = common_file.common_app.get_suc;
                                                    }
                                                    #endregion
                                                }
                                            }
                                        }
                                        #endregion
                                    }
                                }
                                else
                                {
                                    if (Qskyd_fjrb_add_edit_delete_new.Qskyd_fjrb_add_edit_delete_app(id.ToString(), yydh, qymc, lsbh, krxm, sktt, yddj, fjrb, fjbh, ddsj, lksj, lzfs, shqh, fjjg, sjfjjg, yh, yhbl, bz, czy, czsj, cznr, zyzt, add_edit_delete, xxzs, fjbm, jcje) == common_file.common_app.get_suc)
                                    {
                                        s = common_file.common_app.get_suc;
                                    }
                                    else
                                    {
                                        return(s);
                                    }
                                }
                            }
                            else
                            {
                                if (Qskyd_fjrb_add_edit_delete_new.Qskyd_fjrb_add_edit_delete_app(id.ToString(), yydh, qymc, lsbh, krxm, sktt, yddj, fjrb, fjbh, ddsj, lksj, lzfs, shqh, fjjg, sjfjjg, yh, yhbl, bz, czy, czsj, cznr, zyzt, add_edit_delete, xxzs, fjbm, jcje) == common_file.common_app.get_suc)
                                {
                                    s = common_file.common_app.get_suc;
                                }
                            }
                        }
                    }    //if (yddj == common_file.common_yddj.yddj_yd)
                    else
                    if (yddj == common_file.common_yddj.yddj_dj)
                    {
                        if (Qskyd_fjrb_add_edit_delete_new.Qskyd_fjrb_add_edit_delete_app(id.ToString(), yydh, qymc, lsbh, krxm, sktt, yddj, fjrb, fjbh, ddsj, lksj, lzfs, shqh, fjjg, sjfjjg, yh, yhbl, bz, czy, czsj, cznr, zyzt, add_edit_delete, xxzs, fjbm, jcje) == common_file.common_app.get_suc)
                        {
                            s = common_file.common_app.get_suc;
                        }
                        else
                        {
                            return(s);
                        }
                    }        //if (yddj == common_file.common_yddj.yddj_dj)
                }
                #endregion
                #region hy类型的时候
                else
                if (sktt == common_file.common_sktt.sktt_tt || sktt == common_file.common_sktt.sktt_hy)
                {
                    if (add_edit_delete == common_file.common_app.get_add)
                    {
                        if (yddj == common_file.common_yddj.yddj_yd)
                        {
                            //1.新增主单
                            //2.修改房类Qskyd_Fjrb表,把fjbh写进,lzfs设为1.
                            //3.修改没有带房号的临时编号lzfs减1
                        }
                    }
                    else
                    if (add_edit_delete == common_file.common_app.get_edit)
                    {
                    }
                }
                #endregion
            }
            ds.Dispose();
            return(s);
        }
コード例 #7
0
        private void timer_GetYdzxData_Tick(object sender, EventArgs e)
        {
            DataSet ds_0 = null;
            DataSet ds_1 = null;

            BLL.Common B_common = new Hotel_app.BLL.Common();
            ds_0 = B_common.GetList(" select * from  View_Qskzd", " id>=0  and  ddyy='" + common_file.common_app.ydzx_flag + "' and  yddj='" + common_file.common_yddj.yddj_yd + "' and shsc=1 ");
            ds_1 = B_common.GetList(" select * from  View_Qttzd", " id>=0  and  ddyy='" + common_file.common_app.ydzx_flag + "' and  yddj='" + common_file.common_yddj.yddj_yd + "' and shsc=1 ");
            string url = common_app.service_url;
            string clinetAppVersion = "";

            //弹出预订中心的订单
            if ((ds_0 != null && ds_0.Tables[0].Rows.Count > 0) || (ds_1 != null && ds_1.Tables[0].Rows.Count > 0))
            {
                fmain_new mainhelper = new fmain_new();
                Qyddj.Q_ydzx_noticeBar taskbarNotifier = new Hotel_app.Qyddj.Q_ydzx_noticeBar();
                string path      = Application.StartupPath;
                string fileName  = path + "\\image\\" + "skin2.bmp";
                string fileName1 = path + "\\image\\" + "close2.bmp";

                taskbarNotifier.SetBackgroundBitmap(fileName, Color.FromArgb(255, 0, 255));
                taskbarNotifier.SetCloseBitmap(fileName1, Color.FromArgb(255, 0, 255), new Point(300, 74));
                taskbarNotifier.TitleRectangle   = new Rectangle(123, 80, 176, 16);
                taskbarNotifier.ContentRectangle = new Rectangle(116, 97, 197, 22);
                taskbarNotifier.TitleClick      += new EventHandler(mainhelper.TitleClick);
                taskbarNotifier.ContentClick    += new EventHandler(mainhelper.ContentClick);
                taskbarNotifier.CloseClick      += new EventHandler(mainhelper.CloseClick);

                taskbarNotifier.CloseClickable           = true; // checkBoxCloseClickable.Checked;
                taskbarNotifier.TitleClickable           = true; //  checkBoxTitleClickable.Checked;
                taskbarNotifier.ContentClickable         = true; //  checkBoxContentClickable.Checked;
                taskbarNotifier.EnableSelectionRectangle = true; //  checkBoxSelectionRectangle.Checked;
                taskbarNotifier.KeepVisibleOnMousOver    = true; //  checkBoxKeepVisibleOnMouseOver.Checked;	// Added Rev 002
                taskbarNotifier.ReShowOnMouseOver        = true; //  checkBoxReShowOnMouseOver.Checked;			// Added Rev 002
                taskbarNotifier.Show("网站订单提醒", "你有新的订单信息,点击查看详细", 10000, 10000, 0);
            }
            //查询新版本
            clinetAppVersion = System.Diagnostics.FileVersionInfo.GetVersionInfo(Application.StartupPath + "\\hotel_app.exe").ProductVersion;
            url += "update.asmx";
            object[] args = new object[2];
            args[0] = common_file.common_app.yydh;
            args[1] = clinetAppVersion;
            object result = Hotel_app.DynamicWebServiceCall.InvokeWebService(url, "GetUpdate", args);

            if (result != null && result.ToString() != "")
            {
                fmain_new mainhelper = new fmain_new();
                //mainhelper.Fmain = this;
                Qyddj.Q_ydzx_noticeBar taskbarNotifier = new Hotel_app.Qyddj.Q_ydzx_noticeBar();
                string path      = Application.StartupPath;
                string fileName  = path + "\\image\\" + "skin.bmp";
                string fileName1 = path + "\\image\\" + "close2.bmp";

                taskbarNotifier.SetBackgroundBitmap(fileName, Color.FromArgb(255, 0, 255));
                taskbarNotifier.SetCloseBitmap(fileName1, Color.FromArgb(255, 0, 255), new Point(300, 74));
                taskbarNotifier.TitleRectangle   = new Rectangle(123, 80, 176, 16);
                taskbarNotifier.ContentRectangle = new Rectangle(116, 97, 197, 22);
                taskbarNotifier.TitleClick      += new EventHandler(mainhelper.TitleClick);
                taskbarNotifier.ContentClick    += new EventHandler(mainhelper.ContentClick_GetNewVersion);
                taskbarNotifier.CloseClick      += new EventHandler(mainhelper.CloseClick);

                taskbarNotifier.CloseClickable           = true; // checkBoxCloseClickable.Checked;
                taskbarNotifier.TitleClickable           = true; //  checkBoxTitleClickable.Checked;
                taskbarNotifier.ContentClickable         = true; //  checkBoxContentClickable.Checked;
                taskbarNotifier.EnableSelectionRectangle = true; //  checkBoxSelectionRectangle.Checked;
                taskbarNotifier.KeepVisibleOnMousOver    = true; //  checkBoxKeepVisibleOnMouseOver.Checked;	// Added Rev 002
                taskbarNotifier.ReShowOnMouseOver        = true; //  checkBoxReShowOnMouseOver.Checked;			// Added Rev 002
                taskbarNotifier.Show("版本检查", "有新的版本产生,点击更新", 10000, 10000, 0);
            }

            //检查钟点房
            BLL.Qskyd_fjrb          bll   = new Hotel_app.BLL.Qskyd_fjrb();
            List <Model.Qskyd_fjrb> lists = bll.GetModelList(" yydh='" + common_file.common_app.yydh + "'  and   yddj='" + common_file.common_yddj.yddj_dj + "'  and   sktt='" + common_file.common_sktt.sktt_zd + "'  and  lksj<'" + DateTime.Now + "' ");

            if (lists != null && lists.Count > 0)
            {
                StringBuilder sb = new StringBuilder();
                sb.Append("以下钟点房超时,请确认加收钟点房费:");
                foreach (var item in lists)
                {
                    sb.Append("[房号:" + item.fjbh + "]" + "\r\t");
                }

                fmain_new mainhelper = new fmain_new();
                Qyddj.Q_ydzx_noticeBar taskbarNotifier = new Hotel_app.Qyddj.Q_ydzx_noticeBar();
                string path      = Application.StartupPath;
                string fileName  = path + "\\image\\" + "skin2.bmp";
                string fileName1 = path + "\\image\\" + "close2.bmp";

                taskbarNotifier.SetBackgroundBitmap(fileName, Color.FromArgb(255, 0, 255));
                taskbarNotifier.SetCloseBitmap(fileName1, Color.FromArgb(255, 0, 255), new Point(300, 74));
                taskbarNotifier.TitleRectangle   = new Rectangle(123, 80, 176, 16);
                taskbarNotifier.ContentRectangle = new Rectangle(116, 97, 197, 22);
                taskbarNotifier.TitleClick      += new EventHandler(mainhelper.TitleClick);
                //taskbarNotifier.ContentClick += new EventHandler(mainhelper.ContentClick_GetNewVersion);
                taskbarNotifier.CloseClick += new EventHandler(mainhelper.CloseClick);

                taskbarNotifier.CloseClickable           = true; // checkBoxCloseClickable.Checked;
                taskbarNotifier.TitleClickable           = true; //  checkBoxTitleClickable.Checked;
                taskbarNotifier.ContentClickable         = true; //  checkBoxContentClickable.Checked;
                taskbarNotifier.EnableSelectionRectangle = true; //  checkBoxSelectionRectangle.Checked;
                taskbarNotifier.KeepVisibleOnMousOver    = true; //  checkBoxKeepVisibleOnMouseOver.Checked;	// Added Rev 002
                taskbarNotifier.ReShowOnMouseOver        = true; //  checkBoxReShowOnMouseOver.Checked;			// Added Rev 002
                taskbarNotifier.Show("钟点房超时提醒", sb.ToString(), 10000, 10000, 0);
            }
        }