Beispiel #1
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;
        }
Beispiel #2
0
        private void GetZzInfo()
        {
            common_file.common_app.get_czsj();

            // 记、挂--转帐
            if (Zz_Type == Szwgl.common_zw.zwzz_gz_tt || Zz_Type == Szwgl.common_zw.zwzz_jz_tt || Zz_Type == Szwgl.common_zw.zwzz_gz_sk || Zz_Type == Szwgl.common_zw.zwzz_jz_sk)
            {
                //帐务向团体转
                if (Zz_Type == Szwgl.common_zw.zwzz_gz_tt || Zz_Type == Szwgl.common_zw.zwzz_jz_tt)//向团体转
                {
                    if (dg_tt.Rows.Count > 0)
                    {
                        if (dg_tt.CurrentRow != null)
                        {
                            int         i   = dg_tt.CurrentRow.Index;
                            DataRowView dgr = dg_tt.CurrentRow.DataBoundItem as DataRowView;
                            i = DS_Qtt.Tables[0].Rows.IndexOf(dgr.Row);


                            if (i > -1 && i < dg_tt.Rows.Count)//当前行为内容行
                            {
                                int id_temp = Convert.ToInt32(DS_Qtt.Tables[0].Rows[i]["id"].ToString());
                                M_Qttyd_mainrecord = B_Qttyd_mainrecord.GetModelList("Id=" + id_temp)[0];
                                lsbh_new           = M_Qttyd_mainrecord.lsbh;
                            }
                        }
                        else
                        {
                            return;
                        }
                    }
                    else
                    {
                        return;
                    }
                }
                //帐务向散客转
                if (Zz_Type == Szwgl.common_zw.zwzz_gz_sk || Zz_Type == Szwgl.common_zw.zwzz_jz_sk)//向散客转
                {
                    if (dg_sk.Rows.Count > 0)
                    {
                        if (dg_sk.CurrentRow != null)
                        {
                            int         i   = dg_sk.CurrentRow.Index;
                            DataRowView dgr = dg_sk.CurrentRow.DataBoundItem as DataRowView;
                            if (dgr != null)
                            {
                                i = DS_Qsk.Tables[0].Rows.IndexOf(dgr.Row);



                                if (i > -1 && i < dg_sk.Rows.Count)//当前行为内容行
                                {
                                    int id_temp = Convert.ToInt32(DS_Qsk.Tables[0].Rows[i]["id"].ToString());
                                    //DS_Qsk.Tables[0].Rows[i]["id"].ToString();
                                    M_Qskyd_mainrecord = B_Qskyd_mainrecord.GetModelList("id=" + id_temp)[0];
                                    lsbh_new           = M_Qskyd_mainrecord.lsbh;
                                }
                            }
                        }
                        else
                        {
                            return;
                        }
                    }
                    else
                    {
                        return;
                    }
                }

                //注意这里传的是记挂的结帐主单ID
                M_Sjzzd  = B_Sjzzd.GetModel(int.Parse(id));
                lsbh_old = M_Sjzzd.lsbh;
                jzbh_old = M_Sjzzd.jzbh;
                sk_tt    = M_Sjzzd.sktt;
            }

            //在住---向团体转
            if (Zz_Type == Szwgl.common_zw.zwzz_sk_tt || Zz_Type == Szwgl.common_zw.zwzz_tt_tt || Zz_Type == Szwgl.common_zw.zwzz_tt_sk || Zz_Type == Szwgl.common_zw.zwzz_sk_sk)
            {
                if (Zz_Type == Szwgl.common_zw.zwzz_sk_tt || Zz_Type == Szwgl.common_zw.zwzz_tt_tt)
                {
                    if (dg_tt.Rows.Count > 0)
                    {
                        if (dg_tt.CurrentRow != null)
                        {
                            int         i   = dg_tt.CurrentRow.Index;
                            DataRowView dgr = dg_tt.CurrentRow.DataBoundItem as DataRowView;
                            if (dgr != null)
                            {
                                i = DS_Qtt.Tables[0].Rows.IndexOf(dgr.Row);


                                if (i > -1 && i < dg_tt.Rows.Count)//当前行为内容行
                                {
                                    int id_temp = Convert.ToInt32(DS_Qtt.Tables[0].Rows[i]["id"].ToString());
                                    M_Qttyd_mainrecord = B_Qttyd_mainrecord.GetModelList("Id=" + id_temp)[0];
                                    lsbh_new           = M_Qttyd_mainrecord.lsbh;
                                }
                            }

                            if (Zz_Type == Szwgl.common_zw.zwzz_sk_tt)
                            {
                                M_Qskyd_mainrecord = B_Qskyd_mainrecord.GetModel(int.Parse(id));
                                lsbh_old           = M_Qskyd_mainrecord.lsbh;
                                sk_tt = M_Qskyd_mainrecord.sktt;
                            }
                            if (Zz_Type == Szwgl.common_zw.zwzz_tt_tt)
                            {
                                M_Qttyd_mainrecord = B_Qttyd_mainrecord.GetModel(int.Parse(id));
                                lsbh_old           = M_Qttyd_mainrecord.lsbh;
                                sk_tt = M_Qttyd_mainrecord.sktt;
                            }
                        }
                        else
                        {
                            return;
                        }
                    }
                    else
                    {
                        return;
                    }
                }

                //在住---向散客转
                if (Zz_Type == Szwgl.common_zw.zwzz_tt_sk || Zz_Type == Szwgl.common_zw.zwzz_sk_sk)
                {
                    if (dg_sk.Rows.Count > 0)
                    {
                        if (dg_sk.CurrentRow != null)
                        {
                            int         i   = dg_sk.CurrentRow.Index;
                            DataRowView dgr = dg_sk.CurrentRow.DataBoundItem as DataRowView;
                            if (dgr != null)
                            {
                                i = DS_Qsk.Tables[0].Rows.IndexOf(dgr.Row);

                                if (i > -1 && i < dg_sk.Rows.Count)//当前行为内容行
                                {
                                    int id_temp = Convert.ToInt32(DS_Qsk.Tables[0].Rows[i]["id"].ToString());
                                    //DS_Qsk.Tables[0].Rows[i]["id"].ToString();
                                    M_Qskyd_mainrecord = B_Qskyd_mainrecord.GetModelList("id=" + id_temp)[0];
                                    lsbh_new           = M_Qskyd_mainrecord.lsbh;
                                }
                            }
                            if (Zz_Type == Szwgl.common_zw.zwzz_sk_sk)
                            {
                                {
                                    M_Qskyd_mainrecord = B_Qskyd_mainrecord.GetModel(int.Parse(id));
                                    lsbh_old           = M_Qskyd_mainrecord.lsbh;
                                    sk_tt = M_Qskyd_mainrecord.sktt;
                                }
                            }
                            if (Zz_Type == Szwgl.common_zw.zwzz_tt_sk)
                            {
                                M_Qttyd_mainrecord = B_Qttyd_mainrecord.GetModel(int.Parse(id));
                                lsbh_old           = M_Qttyd_mainrecord.lsbh;
                                sk_tt = M_Qttyd_mainrecord.sktt;
                            }
                        }
                        else
                        {
                            return;
                        }
                    }
                    else
                    {
                        return;
                    }
                }
            }
            Cursor.Current = Cursors.Default;
        }
Beispiel #3
0
        //private void display_new_commonform_1(string judge_type_0, int left_0, int top_0, TextBox TB_ls)
        //{
        //    common_file.common_app.get_czsj();
        //    Xxtsz.X_common_one X_common_one_new = new Hotel_app.Xxtsz.X_common_one();
        //    X_common_one_new.judge_type = judge_type_0;
        //    X_common_one_new.Left = common_file.common_app.x();
        //    X_common_one_new.Top = common_file.common_app.y();
        //    if (X_common_one_new.ShowDialog() == DialogResult.OK)
        //    {
        //        TB_ls.Text = X_common_one_new.get_value;
        //    }
        //    X_common_one_new.Dispose();
        //    TB_ls.Focus();
        //    Cursor.Current = Cursors.Default;
        //}

        private void b_save_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (checkTbValue())
            {
                id_app = common_file.common_ddbh.ddbh("pzsk", "lsbhdate", "lsbhcounter", 6);//平帐收款

                string   url  = common_file.common_app.service_url + "Szwgl/Szwgl_app.asmx";
                object[] args = new object[30];
                args[0] = "0";//Xxfxr_id
                args[1] = common_file.common_app.yydh;
                args[2] = common_file.common_app.qymc;
                args[3] = id_app;
                if ((openfrom == "Szw_Common") || (openfrom == "Sfjcz") || (openfrom == "Szw_pljz")) //部分算帐,记/挂分结都要生成新的jzbh
                {
                    args[4] = "";                                                                    //初始jzbh为空
                }
                if ((openfrom == "Sjjzwll"))
                {
                    args[4] = jzbh; //B_sjzmx.GetModelList("id>=0  " + common_file.common_app.yydh_select + " and  lsbh='" + lsbh + "'")[0].jzbh;
                }
                if (openfrom == "Szw_pljz")
                {
                    args[5] = common_file.common_ddbh.ddbh("gzpj", "lsbhdate", "lsbhcounter", 6);
                    //args[5] = this.lsbh;
                    args[6] = jzzt;
                    args[7] = "";
                    args[8] = "";
                    args[9] = "";
                }
                else
                {
                    args[5] = this.lsbh;
                    args[6] = jzzt;
                    args[7] = "";
                    args[8] = "";
                    args[9] = "";
                }
                if ((openfrom == "Szw_Common") || (openfrom == "Sfjcz" && jjType == common_file.common_jzzt.czzt_bfsz))//部分算帐才会在主单里面找
                {
                    if (sk_tt == "sk")
                    {
                        M_Qskyd_mainrecord = B_Qskyd_mainrecord.GetModelList("id>=0  " + common_file.common_app.yydh_select + "  and lsbh='" + this.lsbh + "'")[0];
                        M_Qskyd_fjrb       = B_Qskyd_fjrb.GetModelList("id>=0  " + common_file.common_app.yydh_select + "  and lsbh='" + this.lsbh + "'")[0];
                        args[6]            = M_Qskyd_mainrecord.krxm;
                        args[7]            = M_Qskyd_fjrb.fjrb;
                        args[8]            = M_Qskyd_fjrb.fjbh;
                        args[9]            = M_Qskyd_mainrecord.sktt;
                    }
                    if (sk_tt == "tt")
                    {
                        M_Qttyd_mainrecord = B_Qttyd_mainrecord.GetModelList("id>=0  " + common_file.common_app.yydh_select + "  and lsbh='" + this.lsbh + "'")[0];
                        args[6]            = M_Qttyd_mainrecord.krxm;
                        args[7]            = "";
                        args[8]            = "";
                        args[9]            = M_Qttyd_mainrecord.sktt;
                    }
                }
                //是从帐务浏览打开或者分结操作中的记/挂帐分结
                else if (openfrom == "Sjjzwll" || (openfrom == "Sfjcz" && (jjType == common_file.common_jzzt.czzt_gz || jjType == common_file.common_jzzt.czzt_jz)))//是从帐务浏览打开的
                {
                    if (sk_tt == "sk")
                    {
                        BLL.Common B_common = new Hotel_app.BLL.Common();
                        DataSet    ds_00    = B_common.GetList("select * from Sjzzd ", "id>=0  " + common_file.common_app.yydh_select + " and jzbh='" + jzbh + "'");
                        if (ds_00 != null && ds_00.Tables[0].Rows.Count > 0)
                        {
                            //M_Qskyd_mainrecord_bak = B_Qskyd_mainrecord_bak.GetModelList("id>=0  " + common_file.common_app.yydh_select + "  and lsbh='" + this.lsbh + "'")[0];
                            //M_Qskyd_fjrb_bak = B_Qskyd_fjrb_bak.GetModelList("id>=0  " + common_file.common_app.yydh_select + "  and lsbh='" + this.lsbh + "'")[0];
                            args[6] = ds_00.Tables[0].Rows[0]["krxm"].ToString();
                            args[7] = "";
                            args[8] = ds_00.Tables[0].Rows[0]["fjbh"].ToString();
                            args[9] = ds_00.Tables[0].Rows[0]["sktt"].ToString();
                        }
                    }
                    if (sk_tt == "tt")
                    {
                        //M_Qttyd_mainrecord_bak = B_Qttyd_mainrecord_bak.GetModelList("id>=0  " + common_file.common_app.yydh_select + "  and lsbh='" + this.lsbh + "'")[0];
                        BLL.Common B_common = new Hotel_app.BLL.Common();
                        DataSet    ds_00    = B_common.GetList("select * from Sjzzd ", "id>=0  " + common_file.common_app.yydh_select + " and jzbh='" + jzbh + "'");
                        if (ds_00 != null)
                        {
                            args[6] = ds_00.Tables[0].Rows[0]["krxm"].ToString();
                            args[7] = "";
                            args[8] = "";
                            args[9] = ds_00.Tables[0].Rows[0]["sktt"].ToString();
                        }
                        else
                        {
                            args[6] = "";
                            args[7] = "";
                            args[8] = "";
                            args[9] = "";
                        }
                    }
                }
                //xfrq,xfsj,czy,xfdr,xfrb,xfxm,xfbz,xfzy
                args[10] = DateTime.Now.ToString("yyyy-MM-dd");
                args[11] = DateTime.Now.ToString();
                args[12] = common_file.common_app.czy;
                args[13] = common_file.common_app.fkdr;//这里是找出节点的付款大类
                args[14] = common_file.common_app.dj_pzsk;
                args[15] = common_file.common_app.dj_pzsk;
                args[16] = "平帐时,客户再付款为:" + tB_krzfk.Text.Trim() + ";客户最后收回:" + tB_krxsh.Text.Trim();//摘要描述平帐时的操作
                args[17] = common_file.common_app.dj_pzsk;
                //xfje,yh,sjxfje,xfsl,czy_bc,czzt,czsj,syzd,add,xxzs
                if (krzqk > 0)
                {
                    args[18] = "-" + krzqk.ToString().Trim().Replace("'", "-");
                    args[20] = "-" + krzqk.ToString().Trim().Replace("'", "-");
                }
                if (krzqk < 0)
                {
                    args[18] = Math.Abs(krzqk).ToString().Trim().Replace("'", "-");
                    args[20] = Math.Abs(krzqk).ToString().Trim().Replace("'", "-");
                }
                args[19] = "";
                args[21] = "1";
                args[22] = common_file.common_app.czy_bc;
                if (openfrom == "Sjjzwll")
                {
                    string czzt_Temp = (jjType == common_file.common_jzzt.czzt_gz) ? common_file.common_jzzt.czzt_gzzsz : common_file.common_jzzt.czzt_jzzsz;
                    args[23] = czzt_Temp;
                }
                if (openfrom == "Sfjcz" && (jjType == common_file.common_jzzt.czzt_gz || jjType == common_file.common_jzzt.czzt_jz || jjType == common_file.common_jzzt.czzt_bfsz))
                {
                    string czzt_temp = "";
                    if (jjType == common_file.common_jzzt.czzt_gz || jjType == common_file.common_jzzt.czzt_gzfj)
                    {
                        czzt_temp = (jjType == common_file.common_jzzt.czzt_gz) ? jjType = common_file.common_jzzt.czzt_gzfj : jjType = common_file.common_jzzt.czzt_jzfj;
                    }
                    else
                    {
                        czzt_temp = common_file.common_jzzt.czzt_bfsz;
                    }
                    args[23] = czzt_temp;
                }
                else if (openfrom == "Szw_Common")
                {
                    args[23] = jjType;//挂,记,结 直接用(当结帐时要更改相应记录的状态)
                }
                else if (openfrom == "Szw_pljz")
                {
                    args[23] = common_file.common_jzzt.czzt_gzzsz;
                }
                //czsj, syzd, is_visible, add_edit_delete, xxzs,jjje
                //args[24] = common_file.common_app.xxzs,fkfs
                args[24] = DateTime.Now.ToString();
                args[25] = common_file.common_app.syzd;
                args[26] = common_file.common_app.get_add;
                args[27] = common_file.common_app.xxzs;
                args[28] = tB_fkfs.Text.Trim();
                args[29] = common_file.common_app.czy_GUID;

                Hotel_app.Server.Szwgl.Szw_jzOrgzOrSZ Szw_jzOrgzOrSZ_services = new Hotel_app.Server.Szwgl.Szw_jzOrgzOrSZ();

                string result = Szw_jzOrgzOrSZ_services.Sjzmx_pz(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(), args[10].ToString(), args[11].ToString(), args[12].ToString(), args[13].ToString(),
                                                                 args[14].ToString(), args[15].ToString(), args[16].ToString(), args[17].ToString(), args[18].ToString(), args[19].ToString(), args[20].ToString(), args[21].ToString(), args[22].ToString(), args[23].ToString(), args[24].ToString(), args[25].ToString(), args[26].ToString(), args[27].ToString(), args[28].ToString(), args[29].ToString());
                //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Fun_PZ", args);
                if (result != null && result == 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.Szwcz_new.pz_control = true;//成功后,可以结帐
                    this.Close();
                }
            }
            Cursor.Current = Cursors.Default;
        }
Beispiel #4
0
        private void b_save_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (tB_fkfs.Text.Trim() == "")
            {
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "请选择付款方式");
                return;
            }
            else if (tB_xfje.Text.Trim() == "")
            {
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "请填写付款金额");
                return;
            }
            //既不是数字也不是decimal
            else if (((Maticsoft.Common.PageValidate.IsDecimal(tB_xfje.Text.Trim())) || (Maticsoft.Common.PageValidate.IsNumber(tB_xfje.Text.Trim()))) == false)
            {
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "对不起,所输入的金额不是有效数字!");
                tB_xfje.Focus();
            }
            else
            {
                id_app = common_file.common_ddbh.ddbh("yjcz", "lsbhdate", "lsbhcounter", 6);

                //id, yydh, qymc, id_app, jzbh, lsbh, krxm, fjrb, fjbh, sktt, xfrq, xfsj, czy, xfdr, xfrb, xfxm, xfbz, xfzy, fkfs, xfje, sjxfje, czy_bc, syzd, add_edit_delete, xxzs
                string   url  = common_file.common_app.service_url + "Szwgl/Szwgl_app.asmx";
                object[] args = new object[26];
                args[0] = Syjcz_id;
                args[1] = common_file.common_app.yydh;
                args[2] = common_file.common_app.qymc;
                args[3] = id_app;
                if (openfrom == "Szwcl") //结记挂帐之前
                {
                    args[4] = "";        //结帐前jzbh为空
                }
                else
                {
                    //string jzbh_temp = DbHelperSQL.GetSingle("SELECT Jzbh  from  Sjzzd where lsbh='" + lsbh + "'").ToString();
                    args[4] = jzbh;
                }
                args[5] = lsbh;
                if (openfrom == "Szwcl")
                {
                    if (sk_tt == "sk")
                    {
                        M_Qskyd_mainrecord = B_Qskyd_mainrecord.GetModelList("id>=0 " + common_file.common_app.yydh_select + " and lsbh='" + lsbh + "'")[0];
                        M_Qskyd_fjrb       = B_Qskyd_fjrb.GetModelList("id>=0 " + common_file.common_app.yydh_select + " and Lsbh='" + lsbh + "'")[0];
                        args[6]            = M_Qskyd_mainrecord.krxm;
                        args[7]            = M_Qskyd_fjrb.fjrb;
                        args[8]            = M_Qskyd_fjrb.fjbh;
                        args[9]            = M_Qskyd_mainrecord.sktt;
                    }
                    else if (sk_tt == "tt")
                    {
                        M_Qttyd_mainrecord = B_M_Qttyd_mainrecord.GetModelList("id>=0 " + common_file.common_app.yydh_select + " and  lsbh='" + lsbh + "'")[0];
                        args[6]            = M_Qttyd_mainrecord.krxm;
                        args[7]            = "";
                        args[8]            = "";
                        args[9]            = M_Qttyd_mainrecord.sktt;
                    }
                }
                else
                {
                    if (sk_tt == "sk")
                    {
                        List <Model.Qskyd_mainrecord_bak> list = new List <Hotel_app.Model.Qskyd_mainrecord_bak>();
                        list = B_Qskyd_mainrecord_bak.GetModelList("id>=0 " + common_file.common_app.yydh_select + " and lsbh='" + lsbh + "'");
                        if (list.Count > 0)
                        {
                            M_Qskyd_mainrecord_bak = list[0];
                            M_Qskyd_fjrb_bak       = B_Qskyd_fjrb_bak.GetModelList("id>=0 " + common_file.common_app.yydh_select + " and Lsbh='" + lsbh + "'")[0];
                            args[6] = M_Qskyd_mainrecord_bak.krxm;
                            args[7] = M_Qskyd_fjrb_bak.fjrb;
                            if (M_Qskyd_fjrb_bak.fjbh != null)
                            {
                                args[8] = M_Qskyd_fjrb_bak.fjbh;
                            }
                            else
                            {
                                args[8] = "";
                            }
                            args[9] = M_Qskyd_mainrecord_bak.sktt;
                        }
                        else
                        {
                            args[6] = "";
                            args[7] = "";
                            args[8] = "";
                        }
                    }
                    else if (sk_tt == "tt")
                    {
                        List <Model.Qttyd_mainrecord_bak> list = new List <Hotel_app.Model.Qttyd_mainrecord_bak>();
                        list = B_Qttyd_mainrecord_bak.GetModelList("id>=0 " + common_file.common_app.yydh_select + " and  lsbh='" + lsbh + "'");
                        if (list.Count > 0)
                        {
                            M_Qttyd_mainrecord_bak = list[0];
                            args[6] = M_Qttyd_mainrecord_bak.krxm;
                        }
                        else
                        {
                            args[6] = "";
                        }
                        args[7] = "";
                        args[8] = "";
                        if (list.Count > 0)
                        {
                            args[9] = M_Qttyd_mainrecord_bak.sktt;
                        }
                        else
                        {
                            args[9] = common_file.common_sktt.sktt_tt;
                        }
                    }
                }
                args[10] = DateTime.Now.ToString("yyyy-MM-dd");
                args[11] = DateTime.Now.ToString();
                args[12] = common_file.common_app.czy;
                args[13] = common_file.common_app.fkdr;
                args[14] = common_file.common_app.dj_ysk;
                args[15] = tB_xfxm.Text.Trim().Replace("'", "-");
                args[16] = tB_bz.Text.Trim().Replace("'", "-");
                args[17] = tB_fkzy.Text.Trim().Replace("'", "-");
                args[18] = tB_fkfs.Text.Trim().Replace("'", "-");
                args[19] = tB_xfje.Text.Trim().Replace("'", "-");
                args[20] = tB_xfje.Text.Trim().Replace("'", "-");
                args[21] = common_file.common_app.czy_bc;
                args[22] = common_file.common_app.syzd;
                args[23] = judge_add_edit;
                args[24] = common_file.common_app.xxzs;
                args[25] = DateTime.Now.ToString();

                Hotel_app.Server.Szwgl.Syjcz Syjcz_new = new Hotel_app.Server.Szwgl.Syjcz();
                string result = Syjcz_new.Syjcz_add_edit(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(), args[10].ToString(), args[11].ToString(), args[12].ToString(), args[13].ToString(), args[14].ToString(), args[15].ToString(), args[16].ToString(), args[17].ToString(), args[18].ToString(), args[19].ToString(), args[20].ToString(), args[21].ToString(), args[22].ToString(), args[23].ToString(), args[24].ToString(), args[25].ToString());
                // object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Syjcz_add_edit", args);
                if (result == common_file.common_app.get_suc)
                {
                    this.DialogResult = DialogResult.OK;
                    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, "操作失败!");
                }
            }
            Cursor.Current = Cursors.Default;
        }