Example #1
0
 private void start_hz()
 {
     common_file.common_app.get_czsj();
     if (sktt_bz == get_sktt)
     {
         common_file.common_app.Message_box_show(common_file.common_app.message_title, "对不起,客人已经是" + get_sktt + "了!不必再重复转换!");
         return;
     }
     if (common_file.common_app.message_box_show_select(common_file.common_app.message_title, "是否确认要将客人从" + sktt_bz + "转成" + get_sktt + "!") == true)
     {
         common_file.common_app.get_czsj();
         string url = common_file.common_app.service_url;
         url += "Qyddj/Qyddj_app.asmx";
         object[] args = new object[12];
         args[0]  = common_file.common_app.yydh;
         args[1]  = common_file.common_app.qymc;
         args[2]  = sktt;
         args[3]  = lsbh;
         args[4]  = krxm;
         args[5]  = ddbh;
         args[6]  = "";
         args[7]  = sktt_bz;
         args[8]  = get_sktt;
         args[9]  = common_file.common_app.czy;
         args[10] = DateTime.Now;
         args[11] = common_file.common_app.xxzs;
         //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "sktt_hz", args);
         Hotel_app.Server.Qyddj.Qyddj_add_edit_delete_1 Qyddj_add_edit_delete_1_services = new Hotel_app.Server.Qyddj.Qyddj_add_edit_delete_1();
         string result = Qyddj_add_edit_delete_1_services.sktt_hz(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(), args[9].ToString(), DateTime.Parse(args[10].ToString()), args[11].ToString());
         if (result != null && result == common_file.common_app.get_suc)
         {
             common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作成功!");
             this.Close();
         }
         else
         {
             common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作失败!");
         }
     }
     Cursor.Current = Cursors.Default;
 }
Example #2
0
        void click_tt()
        {
            common_file.common_app.get_czsj();

            switch (load_type)
            {
            case "lt":
                DataSet DS_temp = B_Common.GetList("select * from View_Qskzd", "id='" + id + "'");
                if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
                {
                    int j_000 = 0;
                    if (dg_tt.CurrentRow != null)
                    {
                        DataRowView dgr = dg_tt.CurrentRow.DataBoundItem as DataRowView;
                        if (dgr != null)
                        {
                            j_000 = DS_Qtt.Tables[0].Rows.IndexOf(dgr.Row);

                            if (dg_count_tt > 0 && dg_tt.CurrentRow.Index < dg_count_tt && DS_Qtt != null && DS_Qtt.Tables[0].Rows[j_000]["id"].ToString() != "")
                            {
                                common_file.common_app.get_czsj();
                                string url = common_file.common_app.service_url;
                                url += "Qyddj/Qyddj_app.asmx";
                                object[] args = new object[12];
                                args[0]  = common_file.common_app.yydh;
                                args[1]  = common_file.common_app.qymc;
                                args[2]  = "sk";
                                args[3]  = DS_temp.Tables[0].Rows[0]["lsbh"].ToString();
                                args[4]  = DS_temp.Tables[0].Rows[0]["krxm"].ToString();
                                args[5]  = DS_Qtt.Tables[0].Rows[j_000]["ddbh"].ToString();
                                args[6]  = "lt";
                                args[7]  = DS_temp.Tables[0].Rows[0]["sktt"].ToString();
                                args[8]  = DS_Qtt.Tables[0].Rows[j_000]["sktt"].ToString();
                                args[9]  = common_file.common_app.czy;
                                args[10] = DateTime.Now;
                                args[11] = common_file.common_app.xxzs;

                                Hotel_app.Server.Qyddj.Qyddj_add_edit_delete_1 Qyddj_add_edit_delete_1_services = new Hotel_app.Server.Qyddj.Qyddj_add_edit_delete_1();
                                string result = Qyddj_add_edit_delete_1_services.sktt_hz(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(), args[9].ToString(), DateTime.Parse(args[10].ToString()), args[11].ToString());
                                //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "sktt_hz", args);
                                if (result == common_file.common_app.get_suc)
                                {
                                    common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作成功!");
                                    this.Close();
                                }
                                else
                                {
                                    common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作失败!");
                                }
                            }
                        }
                    }
                }
                DS_temp.Dispose();
                break;

            case "bt":


                int k_000 = 0;
                if (dg_tt.CurrentRow != null)
                {
                    DataRowView dgr = dg_tt.CurrentRow.DataBoundItem as DataRowView;
                    if (dgr != null)
                    {
                        k_000 = DS_Qtt.Tables[0].Rows.IndexOf(dgr.Row);

                        if (dg_count_tt > 0 && dg_tt.CurrentRow.Index < dg_count_tt && DS_Qtt != null && DS_Qtt.Tables[0].Rows[k_000]["id"].ToString() != "")
                        {
                            if (common_file.common_app.message_box_show_select(common_file.common_app.message_title, "是否确定要并入当前" + DS_Qtt.Tables[0].Rows[k_000]["krxm"].ToString() + "这个" + DS_Qtt.Tables[0].Rows[k_000]["sktt"].ToString() + "?请注意,并入将不能撤回!") == true)
                            {
                                DataSet DS_temp_1 = B_Common.GetList("select lsbh,ddbh from Qttyd_mainrecord", "id='" + id + "'");
                                if (DS_temp_1 != null && DS_temp_1.Tables[0].Rows.Count > 0)
                                {
                                    common_file.common_app.get_czsj();
                                    string url = common_file.common_app.service_url;
                                    url += "Qyddj/Qyddj_app.asmx";
                                    //yydh,  qymc,  czy,  czsj,  lsbh_old,  ddbh_old,  lsbh_add,  ddbh_add,  xxzs
                                    object[] args = new object[9];
                                    args[0] = common_file.common_app.yydh;
                                    args[1] = common_file.common_app.qymc;
                                    args[2] = common_file.common_app.czy;
                                    args[3] = DateTime.Now;
                                    args[4] = DS_temp_1.Tables[0].Rows[0]["lsbh"].ToString();
                                    args[5] = DS_temp_1.Tables[0].Rows[0]["ddbh"].ToString();
                                    args[6] = DS_Qtt.Tables[0].Rows[k_000]["lsbh"].ToString();
                                    args[7] = DS_Qtt.Tables[0].Rows[k_000]["ddbh"].ToString();
                                    args[8] = common_file.common_app.xxzs;

                                    Hotel_app.Server.Qyddj.Q_tt_unit Q_tt_unit_services = new Hotel_app.Server.Qyddj.Q_tt_unit();
                                    string result = Q_tt_unit_services.tt_unit(args[0].ToString(), args[1].ToString(), args[2].ToString(), DateTime.Parse(args[3].ToString()), args[4].ToString(), args[5].ToString(), args[6].ToString(), args[7].ToString(), args[8].ToString());
                                    //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "tt_unit", 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;
                                        this.Close();
                                    }
                                    else
                                    {
                                        common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作失败!");
                                    }
                                }
                                DS_temp_1.Clear();
                                DS_temp_1.Dispose();
                            }
                        }
                    }
                }

                break;

            case "gzzz":    //挂帐--团体
                Zz_Type = Szwgl.common_zw.zwzz_gz_tt;
                GetZzInfo();
                jzOrgzOrZaiZToZz();
                break;

            case "jzzz":    //记帐--团体
                Zz_Type = Szwgl.common_zw.zwzz_jz_tt;
                GetZzInfo();
                jzOrgzOrZaiZToZz();
                break;

            case "skzz":
                Zz_Type = Szwgl.common_zw.zwzz_sk_tt;
                GetZzInfo();
                jzOrgzOrZaiZToZz();
                break;

            case "ttzz":
                Zz_Type = Szwgl.common_zw.zwzz_tt_tt;
                GetZzInfo();
                jzOrgzOrZaiZToZz();
                break;
            }

            Cursor.Current = Cursors.Default;
        }
Example #3
0
        /// <summary>
        /// 两个值一个sk代表散客、长住、钟点; tt代表团体、会议
        /// </summary>
        /// <param name="id"></param>
        /// <param name="sktt"></param>两个值一个sk代表散客、长住、钟点; tt代表团体、会议
        /// <param name="ddbh"></param>如果是团体要输ddbh,如果不是放空
        ///  <param name="fjbh"></param>如果是房间要输fjbh,如果不是放空
        public bool ydzdj(string lsbh, string fjbh, string ddbh, string sktt)
        {
            bool   get_result = false;
            string url        = common_file.common_app.service_url;

            url += "Qyddj/Qyddj_app.asmx";
            bool shlf = false;

            BLL.Common B_Common = new Hotel_app.BLL.Common();
            if (sktt == "sk")
            {
                if (fjbh != "")
                {
                    //这一部分修改于:2012-11-1(门店提出这种提示容易造成转入住错误,故取消这个提示"

                    //string s_0 = "select * from Qskyd_mainrecord where yddj='"+common_file.common_yddj.yddj_yd+"' and lsbh in(select lsbh from Flfsz where lfbh=(select lfbh from Flfsz where lsbh='"+lsbh+"'))";
                    //DataSet ds_temp = B_Common.GetList("select * from Flfsz", "lfbh in(select lfbh from Flfsz where lsbh='" + lsbh + "')");
                    DataSet ds_temp = B_Common.GetList("select id,lsbh from Qskyd_mainrecord", "yddj='" + common_file.common_yddj.yddj_yd + "' and sktt<>'" + common_file.common_sktt.sktt_tt + "'  and sktt<>'" + common_file.common_sktt.sktt_hy + "'  and lsbh in(select lsbh from Flfsz where lfbh=(select lfbh from Flfsz where lsbh='" + lsbh + "'))");
                    //if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 1)
                    //{
                    //   if (common_file.common_app.message_box_show_select(common_file.common_app.message_title, "有查到该房间有与其他房间联房,是否要一起转成入住呢") == true)
                    //  {
                    //        shlf = true;
                    //    }
                    // }
                    if (common_file.common_yddj.judge_lf_sk(lsbh, fjbh, shlf) == true)
                    {
                        object[] args = new object[10];
                        args[0] = common_file.common_app.yydh;
                        args[1] = common_file.common_app.qymc;
                        args[2] = lsbh;
                        args[3] = sktt;
                        args[4] = ddbh;
                        args[5] = shlf;
                        args[6] = common_file.common_app.czy;
                        args[7] = "预订转登记-散客";
                        args[8] = DateTime.Now;
                        args[9] = common_file.common_app.xxzs;
                        Hotel_app.Server.Qyddj.Qyddj_add_edit_delete_1 Qyddj_add_edit_delete_1_services = new Hotel_app.Server.Qyddj.Qyddj_add_edit_delete_1();
                        string result = Qyddj_add_edit_delete_1_services.ydzdj_app(args[0].ToString(), args[1].ToString(), args[2].ToString(), args[3].ToString(), args[4].ToString(), bool.Parse(args[5].ToString()), args[6].ToString(), args[7].ToString(), DateTime.Parse(args[8].ToString()), args[9].ToString());
                        //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "ydzdj_app", args);
                        if (result == common_file.common_app.get_suc)
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作成功!");
                            get_result = true;
                        }
                        else
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作失败!");
                        }
                    }
                    ds_temp.Dispose();
                }
                else
                {
                    common_file.common_app.Message_box_show(common_file.common_app.message_title, "对不起,没有安排房间,无需转入住!");
                }
            }
            else
            if (sktt == "tt")
            {
                DataSet ds_temp = B_Common.GetList("select * from Qskyd_mainrecord", "ddbh='" + ddbh + "'");
                if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 0)
                {
                    if (common_file.common_yddj.judge_ydzdj_tt(ddbh) == true)
                    {
                        object[] args = new object[10];
                        args[0] = common_file.common_app.yydh;
                        args[1] = common_file.common_app.qymc;
                        args[2] = lsbh;
                        args[3] = sktt;
                        args[4] = ddbh;
                        args[5] = shlf;
                        args[6] = common_file.common_app.czy;
                        args[7] = "预订转登记-团体";
                        args[8] = DateTime.Now;
                        args[9] = common_file.common_app.xxzs;

                        Hotel_app.Server.Qyddj.Qyddj_add_edit_delete_1 Qyddj_add_edit_delete_1_Services = new Hotel_app.Server.Qyddj.Qyddj_add_edit_delete_1();
                        string result = Qyddj_add_edit_delete_1_Services.ydzdj_app(args[0].ToString(), args[1].ToString(), args[2].ToString(), args[3].ToString(), args[4].ToString(), bool.Parse(args[5].ToString()), args[6].ToString(), args[7].ToString(), DateTime.Parse(args[8].ToString()), args[9].ToString());
                        //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "ydzdj_app", args);
                        if (result == common_file.common_app.get_suc)
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作成功!");
                            get_result = true;
                        }
                        else
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作失败!");
                        }
                    }
                    else
                    {
                        common_file.common_app.Message_box_show(common_file.common_app.message_title, "对不起,当前主单不能转入登记,请根据前面弹出框的提示先处理不能转登记的房间再执行团体主单转登记的操作!");
                    }
                }
            }
            return(get_result);
        }