Example #1
0
        //添加到会员兑换记录里
        public string  save_new()
        {
            string lsbh_df = common_file.common_ddbh.ddbh("df", "lsbhdfdate", "lsbhdfcounter", 6);
            //common_file.common_app.Message_box_show(common_file.common_app.message_title,lsbh_df);
            string s   = common_file.common_app.get_failure;
            string url = common_file.common_app.service_url + "Hhygl/Hhygl_app.asmx";

            object[] args = new object[13];
            args[0]  = Hhyjfdf_id;
            args[1]  = common_file.common_app.yydh;
            args[2]  = common_file.common_app.qymc;
            args[3]  = strhykh;
            args[4]  = tB_hykh_bz.Text.Trim().Replace("'", "-");
            args[5]  = tB_krxm.Text.Trim().Replace("'", "-");
            args[6]  = sjjf.ToString();
            args[7]  = "升级" + cB_hyrx.Text;
            args[8]  = "1";
            args[9]  = lsbh_df;
            args[10] = common_file.common_hy.GetHygl(tB_hykh_bz.Text);
            args[11] = judge_add_edit;
            args[12] = common_file.common_app.xxzs;

            Hotel_app.Server.Hhygl.Hhyjf_df Hhyjf_df_services = new Hotel_app.Server.Hhygl.Hhyjf_df();
            string result = Hhyjf_df_services.Hhyjfdf_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());

            //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Hhyjfdf_add_edit", args);
            if (result == common_file.common_app.get_suc)
            {
                common_file.common_czjl.add_czjl(common_file.common_app.yydh, common_file.common_app.qymc, common_file.common_app.czy, "会员升级", "" + Hhyjfdf_id + "", "会员卡号" + tB_hykh_bz.Text + "名称:" + tB_krxm.Text + "升级名称:" + cB_hyrx.Text + "", DateTime.Now);

                s = common_file.common_app.get_suc;
            }
            return(s);
        }
Example #2
0
        public string save_new()
        {
            string lsbh_df = common_file.common_ddbh.ddbh("df", "lsbhdfdate", "lsbhdfcounter", 6);
            string s       = common_file.common_app.get_failure;
            string url     = common_file.common_app.service_url + "Hhygl/Hhygl_app.asmx";

            object[] args = new object[13];
            args[0]  = Hhyjfdf_id;
            args[1]  = common_file.common_app.yydh;
            args[2]  = common_file.common_app.qymc;
            args[3]  = hykh;
            args[4]  = M_Hhygl.hykh_bz;
            args[5]  = M_Hhygl.krxm;
            args[6]  = tB_dfjf.Text.Trim().Replace("'", "-");
            args[7]  = tB_title.Text.Trim().Replace("'", "-");
            args[8]  = tB_dfsl.Text.Trim().Replace("'", "-");
            args[9]  = lsbh_df;
            args[10] = M_Hhygl.parent_hykh;
            args[11] = judge_add_edit;
            args[12] = common_file.common_app.xxzs;

            Hotel_app.Server.Hhygl.Hhyjf_df Hhyjf_df_services = new Hotel_app.Server.Hhygl.Hhyjf_df();
            string result = Hhyjf_df_services.Hhyjfdf_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());

            //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Hhyjfdf_add_edit", args);
            if (result == common_file.common_app.get_suc)
            {
                s = common_file.common_app.get_suc;
                common_file.common_czjl.add_czjl(common_file.common_app.yydh, common_file.common_app.qymc, common_file.common_app.czy, "积分兑换成功", "" + lsbh_df + "", "会员卡号" + M_Hhygl.hykh_bz + "名称:" + tB_title.Text + "兑换积分:" + tB_dfjf.Text + "", DateTime.Now);
            }
            return(s);
        }
Example #3
0
        //结帐,记帐,挂帐处理过程
        public string GetJzResult(string lsbh, string jzbh, string czzt, string sk_tt, string czy, string czsj, string hykh, string xfje, string phoneNo, string yydh)
        {
            string s = common_app.get_failure;

            //记帐,挂帐,结帐的处理节
            if (czzt == common_file.common_jzzt.czzt_sz)//算帐
            {
                strSql = new StringBuilder();
                strSql.Append("delete from Syjcz where id>0  " + common_app.yydh_select + "  and lsbh='" + lsbh + "'");
                B_common.ExecuteSql(strSql.ToString());
                strSql = new StringBuilder();
                strSql.Append("delete from Szwmx  where id>0  " + common_file.common_app.yydh_select + "  and  lsbh='" + lsbh + "'");
                B_common.ExecuteSql(strSql.ToString());
            }
            //更新Ssyxfmx里的Jzbh
            B_common.ExecuteSql("update  Ssyxfmx  set  jzbh='" + jzbh + "'   where   lsbh='" + lsbh + "'");
            if (czzt == common_jzzt.czzt_gz || czzt == common_jzzt.czzt_jz || czzt == common_file.common_jzzt.czzt_sz)
            {
                //清除Szw_temp
                strSql = new StringBuilder();
                strSql.Append("delete from Szw_temp  where  id>0  " + common_app.yydh_select + "  and lsbh='" + lsbh + "'");
                if (B_common.ExecuteSql(strSql.ToString()) >= 0) //清除Szw_temp里面的数据了
                {
                    //调用修改房态的方法(第五步)
                    if (sk_tt == "sk")
                    {
                        M_Qskyd_mainrecord = B_Qskyd_mainrecord.GetModelList("id>0  " + common_app.yydh_select + "  and lsbh='" + lsbh + "'")[0];
                        id = M_Qskyd_mainrecord.id.ToString();

                        //删除主单记录(这里有包含主单记录删除时的备份)
                        if (Qyddj_add_edit_delete_new.delete_sz_xgft(id, "jz", common_file.common_jzzt.czzt_sz, "", jzbh, czy, czsj, xxzs) == common_app.get_suc)
                        {
                            s = common_app.get_suc;
                        }
                    }
                    else//是团体
                    {
                        M_Qttyd_mainrecord = B_Qttyd_mainrecord.GetModelList("ID>0 " + common_app.yydh_select + "  AND lsbh='" + lsbh + "'")[0];
                        string tt_id = M_Qttyd_mainrecord.id.ToString();
                        //要成批更新团体所有成员的房态,并删除成员主单
                        string ddbh_temp = M_Qttyd_mainrecord.ddbh;

                        if (Qttyd_add_edit_delete_new.delete_sz_ttyd(tt_id, "jz", common_file.common_jzzt.czzt_sz, "", jzbh, czy, czsj, xxzs) == common_file.common_app.get_suc)
                        {
                            s = common_file.common_app.get_suc;
                        }
                    }
                    //结帐成功后,更新会员的积分(挂-结,记-结,部分结,结帐都要加积分
                    //会员卡号,当前记录的lsbh,
                    if ((czzt == common_jzzt.czzt_sz) || (czzt == common_jzzt.czzt_jz) || (czzt == common_jzzt.czzt_gz) || (czzt == common_jzzt.czzt_bfsz))
                    {
                        string zjf = "0"; bool shsj = false; string hyrx_now = "";//银卡
                        string dfjf    = "0";
                        string lsbh_df = common_file.common_ddbh.ddbh("df", "lsbhdfdate", "lsbhdfcounter", 6);
                        string qymc    = "";
                        if (!yydh.Equals(""))
                        {
                            DataSet ds000 = B_common.GetList("  select   *  from Xqyxx  ", " id>=0   and   yydh='" + yydh + "'  ");
                            if (ds000 != null && ds000.Tables[0].Rows.Count > 0)
                            {
                                qymc = ds000.Tables[0].Rows[0]["qymc"].ToString();
                            }
                        }
                        IncHYScore(jzbh, lsbh, sk_tt, hykh, xfje, ref zjf, ref shsj);
                        //发送会员消费短信
                        Hhygl.Hhygl_verifyCode Hhygl_verifyCode_new = new Hotel_app.Server.Hhygl.Hhygl_verifyCode();
                        Hhygl_verifyCode_new.Hhygl_SendMsm(phoneNo, zjf, yydh, qymc, common_hyAction.hy_Action_hytf, czsj, "", "", "", hykh, xfje, xxzs);

                        BLL.Hhygl B_Hhygl_new = new Hotel_app.BLL.Hhygl();
                        DataSet   ds111       = B_Hhygl_new.GetList("  hykh_bz='" + hykh + "'  and id>=0  and  hykh_bz!='' ");
                        if (ds111 != null && ds111.Tables[0].Rows.Count > 0)
                        {
                            hyrx_now = ds111.Tables[0].Rows[0]["hykh_bz"].ToString();
                        }


                        //升级需要的积分数
                        BLL.Hhyjb B_Hhyjb_new = new Hotel_app.BLL.Hhyjb();
                        DataSet   ds222       = B_Hhyjb_new.GetList("  hyrx='" + common_app.hykh_rx + "'  and id>=0  and  qymc='" + qymc + "' ");
                        if (ds222 != null && ds222.Tables[0].Rows.Count > 0)
                        {
                            dfjf = ds222.Tables[0].Rows[0]["hykh_bz"].ToString();
                        }


                        if (!hyrx_now.Equals("") && hyrx_now.Equals(common_app.hykh_rx))
                        {
                            //发送短信(判断当前的会员类型),是银卡才自动升级
                            if (shsj)//自动发送升级短信
                            {
                                Hhygl_verifyCode_new.Hhygl_SendMsm(phoneNo, zjf, yydh, qymc, common_hyAction.hy_Action_hytf, czsj, "", "", "", hykh, xfje, xxzs);
                                //调用升级会员的方法,扣除升级积分
                                Hhygl.Hhyjf_df Hhyjf_dr_new = new Hotel_app.Server.Hhygl.Hhyjf_df();
                                Hhyjf_dr_new.Hhyjfdf_add_edit("", yydh, qymc, "", hykh, "", dfjf, "升级金卡", "1", lsbh_df, hykh, common_app.chinese_add, xxzs);
                            }
                        }
                    }
                }
            }
            return(s);
        }