//id,yydh,qymc,jbxs,hyrx,dfjf,is_top,is_select public string Hhyjb_add_edit(string id, string yydh, string qymc, string jbxs, string hyrx, string dfjf, string add_edit_delete, string xxzs) { string s = common_file.common_app.get_failure; BLL.Hhyjb B_Hhyjb = new Hotel_app.BLL.Hhyjb(); Model.Hhyjb M_Hhyjb = new Hotel_app.Model.Hhyjb(); if (xxzs == common_file.common_app.xxzs_xxvalue) { } if (xxzs == common_file.common_app.xxzs_zsvalue) { } if (add_edit_delete == common_file.common_app.get_add) { M_Hhyjb.yydh = yydh; M_Hhyjb.qymc = qymc; M_Hhyjb.jbxs = Convert.ToInt32(jbxs); M_Hhyjb.hyrx = hyrx; M_Hhyjb.dfjf = Convert.ToDecimal(dfjf); if (B_Hhyjb.Add(M_Hhyjb) > 0) { s = common_file.common_app.get_suc; } } else if (add_edit_delete == common_file.common_app.get_edit) { M_Hhyjb = B_Hhyjb.GetModel(Convert.ToInt32(id)); M_Hhyjb.jbxs = Convert.ToInt32(jbxs); M_Hhyjb.hyrx = hyrx; M_Hhyjb.dfjf = Convert.ToDecimal(dfjf); M_Hhyjb.id = int.Parse(id); B_Hhyjb.Update(M_Hhyjb); s = common_file.common_app.get_suc; } else if (add_edit_delete == common_file.common_app.get_delete) { if (id != "") { B_Hhyjb.Delete(Convert.ToInt32(id)); s = common_file.common_app.get_suc; } } return(s); }
//结帐,记帐,挂帐处理过程 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); }