public string add_edit_delete_Q_ff_xyxf(string id, string yydh, string qymc, string fyrx, string xfdr, string xfrb, string xfxm, decimal xfsl, decimal xfje, string add_edit_delete, string czy, DateTime czsj, string cznr, string xxzs, decimal jjje, string mxbh) { string s = common_file.common_app.get_failure; Q_ff_xyxf Q_ff_xyxf_new = new Q_ff_xyxf(); s = Q_ff_xyxf_new.add_edit_delete_Q_ff_xyxf(id, yydh, qymc, fyrx, xfdr, xfrb, xfxm, xfsl, xfje, add_edit_delete, czy, czsj, cznr, xxzs, jjje, mxbh); return(s); }
//团体多间排房 /// <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); }
/// <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); }
/// <summary> /// /// </summary> /// <param name="yydh"></param> /// <param name="qymc"></param> /// <param name="sktt"></param>两个值,一个sk另一个tt /// <param name="old_lsbh"></param> /// <param name="ddsj"></param> /// <param name="lksj"></param> /// <param name="czy"></param> /// <param name="czsj"></param> /// <param name="xxzs"></param> /// <returns></returns> public string copy_sk_yd(string yydh, string qymc, string sktt, string old_lsbh, string lsbh_new, string ddbh_new, string czy, DateTime czsj, string cznr, string xxzs) { string s = common_file.common_app.get_failure; BLL.Common B_Common = new Hotel_app.BLL.Common(); string insert_s = ""; //string lsbh_new = ""; if (sktt == "sk") { //lsbh_new = common_file.common_ddbh.ddbh("skyd", "skyddate", "skydcounter", 6); insert_s = "insert into Qskyd_mainrecord (yydh,qymc,lsbh,ddbh,is_top,is_select,hykh,hyrx,krxm,tlkr,krgj,krmz,yxzj,zjhm,krxb,krsr,krdh,krsj,krEmail,krdz,krjg,krdw,krzy,cxmd,qzrx,qzhm,zjyxq,tlyxq,tjrq,lzka,krly,xyh,xydw,xsy,ddrx,ddwz,ddyy,zyzt,krrx,kr_children,ddsj,lzts,lksj,qtyq,czy,czsj,cznr,shsc,sktt,yddj,ffshys,main_sec,sdcz,ffzf,syzd,vip_type,tsyq,ddly,hykh_bz)"; insert_s = insert_s + " select yydh,qymc,'" + lsbh_new + "','" + ddbh_new + "',0,0,hykh,hyrx,krxm,tlkr,krgj,krmz,yxzj,zjhm,krxb,krsr,krdh,krsj,krEmail,krdz,krjg,krdw,krzy,cxmd,qzrx,qzhm,zjyxq,tlyxq,tjrq,lzka,krly,xyh,xydw,xsy,ddrx,ddwz,'',zyzt,krrx,kr_children,'" + DateTime.Now.ToShortDateString() + " 12:00:00',1,'" + DateTime.Now.AddDays(1).ToShortDateString() + " 12:00:00',qtyq,'" + czy + "','" + czsj + "','" + cznr + "',shsc,'" + common_file.common_sktt.sktt_sk + "','" + common_file.common_yddj.yddj_yd + "',ffshys,main_sec,sdcz,ffzf,syzd,vip_type,tsyq,ddly,hykh_bz from Qskyd_mainrecord where lsbh='" + old_lsbh + "' and main_sec='" + common_file.common_app.main_sec_main + "'"; B_Common.ExecuteSql(insert_s); //Q_ff_xyxf Q_ff_xyxf_new = new Q_ff_xyxf(); //Q_ff_xyxf_new.Qyddj_otherfee_add(yydh, qymc, lsbh_new, "", sktt, "", czy); //insert_s = "delete from Qskyd_fjrb where lsbh='" + lsbh_new + "'"; //B_Common.ExecuteSql(insert_s); DataSet DS_temp = B_Common.GetList("select * from Qskyd_fjrb", "lsbh='" + old_lsbh + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { insert_s = "update Qskyd_fjrb set fjrb='" + DS_temp.Tables[0].Rows[0]["fjrb"].ToString() + "',fjbh='',lzfs=1,fjjg='" + DS_temp.Tables[0].Rows[0]["fjjg"].ToString() + "',sjfjjg='" + DS_temp.Tables[0].Rows[0]["sjfjjg"].ToString() + "',yh='" + DS_temp.Tables[0].Rows[0]["yh"].ToString() + "',yhbl='" + DS_temp.Tables[0].Rows[0]["yhbl"].ToString() + "' where lsbh='" + lsbh_new + "'"; B_Common.ExecuteSql(insert_s); } //insert_s = "insert into Qskyd_fjrb(yydh,qymc,lsbh,krxm,sktt,yddj,fjrb,fjbh,ddsj,lksj,lzfs,shqh,fjjg,sjfjjg,yh,yhbl,bz,czy,czsj,cznr,fjbm,jcje)"; //insert_s = insert_s + " select yydh,qymc,'" + lsbh_new + "',krxm,(select top 1 sktt from Qskyd_mainrecord where lsbh='" + lsbh_new + "' and main_sec='" + common_file.common_app.main_sec_main + "'),(select top 1 yddj from Qskyd_mainrecord where lsbh='" + old_lsbh + "' and main_sec='" + common_file.common_app.main_sec_main + "'),fjrb,'','" + DateTime.Now.ToShortDateString() + " 12:00:00','" + DateTime.Now.AddDays(1).ToShortDateString() + " 12:00:00',lzfs,shqh,fjjg,sjfjjg,yh,yhbl,bz,czy,czsj,cznr,fjbm,0 from Qskyd_fjrb where lsbh='" + old_lsbh + "'"; //B_Common.ExecuteSql(insert_s); Q_ff_xyxf Q_ff_xyxf_new = new Q_ff_xyxf(); string krxm = ""; string sktt0 = ""; string fjbh = ""; DS_temp = B_Common.GetList("select lsbh,krxm,sktt,fjbh from View_Qskzd", " lsbh='" + lsbh_new + "' and main_sec='" + common_file.common_app.main_sec_main + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { krxm = DS_temp.Tables[0].Rows[0]["krxm"].ToString(); sktt = DS_temp.Tables[0].Rows[0]["sktt"].ToString(); fjbh = DS_temp.Tables[0].Rows[0]["fjbh"].ToString(); } Q_ff_xyxf_new.Qyddj_otherfee_add(yydh, qymc, lsbh_new, krxm, sktt0, fjbh, czy); DS_temp.Clear(); DS_temp.Dispose(); //BLL.Qskyd_mainrecord B_Qskyd_mainrecord = new Hotel_app.BLL.Qskyd_mainrecord(); //BLL.Qskyd_fjrb B_Qskyd_fjrb = new Hotel_app.BLL.Qskyd_fjrb(); } else if (sktt == "tt") { //lsbh_new = common_file.common_ddbh.ddbh("ttyd", "ttyddate", "ttydcounter", 6); insert_s = "insert into Qttyd_mainrecord (yydh,qymc,lsbh,ddbh,is_top,is_select,krxm,krbh,krgj,krdh,krsj,krEmail,ydrxm,krdz,krly,xyh,xydw,xsy,ddrx,ddwz,ddyy,zyzt,ddsj,lzts,lksj,qtyq,czy,czsj,cznr,shsc,sktt,yddj,ffshys,sdcz,syzd,tsyq,ddly)"; insert_s = insert_s + " select yydh,qymc,'" + lsbh_new + "','" + ddbh_new + "',0,0,krxm,krbh,krgj,krdh,krsj,krEmail,ydrxm,krdz,krly,xyh,xydw,xsy,ddrx,ddwz,'',zyzt,'" + DateTime.Now.ToShortDateString() + " 12:00:00',1,'" + DateTime.Now.AddDays(1).ToShortDateString() + " 12:00:00',qtyq,'" + czy + "','" + czsj + "','" + cznr + "',shsc,sktt,'" + common_file.common_yddj.yddj_yd + "',ffshys,sdcz,syzd,tsyq,ddly from Qttyd_mainrecord where lsbh='" + old_lsbh + "'"; B_Common.ExecuteSql(insert_s); insert_s = "delete from Qskyd_fjrb where lsbh='" + lsbh_new + "'"; B_Common.ExecuteSql(insert_s); insert_s = "insert into Qskyd_fjrb(yydh,qymc,lsbh,krxm,sktt,yddj,fjrb,fjbh,ddsj,lksj,lzfs,shqh,fjjg,sjfjjg,yh,yhbl,bz,czy,czsj,cznr,fjbm,jcje)"; insert_s = insert_s + " select yydh,qymc,'" + lsbh_new + "',krxm,sktt,(select yddj from Qttyd_mainrecord where lsbh='" + lsbh_new + "' ),fjrb,'','" + DateTime.Now.ToShortDateString() + " 12:00:00','" + DateTime.Now.AddDays(1).ToShortDateString() + " 12:00:00',1,shqh,fjjg,sjfjjg,yh,yhbl,bz,czy,czsj,cznr,fjbm,0 from Qskyd_fjrb where lsbh='" + old_lsbh + "'"; B_Common.ExecuteSql(insert_s); } s = common_file.common_app.get_suc; return(s); }
public string New_skyd_dl_record(string id, string old_lsbh, string czy, string czsj, string xxzs) { string s = common_file.common_app.get_failure; if (id != "") { BLL.Common B_Common = new Hotel_app.BLL.Common(); string new_lsbh = common_file.common_ddbh.ddbh("skdjN", "skdjdate", "skdjcounter", 6); int krzs = 0; DataSet DS_temp = B_Common.GetList("select count(*) as sl from Qskyd_mainrecord", "lsbh='" + old_lsbh + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { krzs = int.Parse(DS_temp.Tables[0].Rows[0]["sl"].ToString()); if (krzs > 2) { krzs = 2; } } if (krzs > 1) { string insert_s = ""; decimal[] fjjg = new decimal[krzs]; decimal[] sjfjjg = new decimal[krzs]; BLL.Qskyd_fjrb B_Qskyd_fjrb = new Hotel_app.BLL.Qskyd_fjrb(); Model.Qskyd_fjrb M_Qskyd_fjrb = new Hotel_app.Model.Qskyd_fjrb(); Model.Qskyd_fjrb M_Qskyd_fjrb_temp = new Hotel_app.Model.Qskyd_fjrb(); DS_temp = B_Common.GetList("select id from Qskyd_fjrb", "lsbh='" + old_lsbh + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { string id_0 = DS_temp.Tables[0].Rows[0]["id"].ToString(); M_Qskyd_fjrb = B_Qskyd_fjrb.GetModel(int.Parse(id_0)); if (M_Qskyd_fjrb != null) { decimal fjjg_temp = 0; decimal sjfjjg_temp = 0; for (int i_0 = 0; i_0 < krzs; i_0++) { if (i_0 < (krzs - 1)) { fjjg[i_0] = decimal.Parse(common_file.common_sswl.Round_sswl(double.Parse(Convert.ToString(M_Qskyd_fjrb.fjjg / krzs)), common_file.common_sswl.sswl_ws, common_file.common_sswl.selectMode_sel).ToString()); fjjg_temp = fjjg_temp + fjjg[i_0]; sjfjjg[i_0] = decimal.Parse(common_file.common_sswl.Round_sswl(double.Parse(Convert.ToString(M_Qskyd_fjrb.sjfjjg / krzs)), common_file.common_sswl.sswl_ws, common_file.common_sswl.selectMode_sel).ToString()); sjfjjg_temp = sjfjjg_temp + fjjg[i_0]; } } fjjg[krzs - 1] = M_Qskyd_fjrb.fjjg - fjjg_temp; sjfjjg[krzs - 1] = M_Qskyd_fjrb.sjfjjg - sjfjjg_temp; insert_s = "insert into Qskyd_fjrb (yydh,qymc,lsbh,krxm,sktt,yddj,fjrb,fjbh,ddsj,lksj,lzfs,shqh,fjjg,sjfjjg,yh,yhbl,bz,is_top,is_select,shsc,czy,czsj,cznr,sdcz,fjbm)"; insert_s = insert_s + " select yydh,qymc,'" + new_lsbh + "',krxm,sktt,yddj,fjrb,fjbh,ddsj,lksj,0,shqh,'" + fjjg[krzs - 1].ToString() + "','" + sjfjjg[krzs - 1].ToString() + "',yh,yhbl,bz,0,0,0,'" + czy + "','" + czsj + "','" + common_file.common_app.chinese_add + "',sdcz,fjbm from Qskyd_fjrb where lsbh='" + old_lsbh + "'"; B_Common.ExecuteSql(insert_s); //增加配套费用 Q_ff_xyxf Q_ff_xyxf_new = new Q_ff_xyxf(); Q_ff_xyxf_new.Qyddj_otherfee_add(M_Qskyd_fjrb.yydh, M_Qskyd_fjrb.qymc, new_lsbh, M_Qskyd_fjrb.krxm, M_Qskyd_fjrb.sktt, "", czy); B_Common.ExecuteSql("update Qskyd_fjrb set fjjg='" + fjjg[0] + "',sjfjjg='" + sjfjjg[0] + "' where lsbh='" + old_lsbh + "'"); insert_s = "insert into Szwzd(yydh,qymc,lsbh,krxm,sktt,yddj,fjbh,fkje,xfje,main_sec,is_top,is_select)"; insert_s = insert_s + " select yydh,qymc,'" + new_lsbh + "',krxm,sktt,yddj,fjbh,0,0,'" + common_file.common_app.main_sec_sec + "',0,0 from Szwzd where lsbh='" + old_lsbh + "'"; B_Common.ExecuteSql(insert_s); B_Common.ExecuteSql("update Qskyd_mainrecord set main_sec='" + common_file.common_app.main_sec_main + "',lsbh='" + new_lsbh + "' where id='" + id + "'"); common_file.common_czjl.add_czjl(M_Qskyd_fjrb.yydh, M_Qskyd_fjrb.qymc, czy, "自成主单", "旧" + old_lsbh + "/新" + new_lsbh, M_Qskyd_fjrb.fjbh, DateTime.Parse(czsj)); s = common_file.common_app.get_suc; } } } DS_temp.Dispose(); } return(s); }
public string Qskdj_add_edit_delete(string id, string yydh, string qymc, string lsbh, string ddbh, string hykh, string hyrx, string krxm, string tlkr, string krgj, string krmz, string yxzj, string zjhm, string krxb, string krsr, string krdh, string krsj, string krEmail, string krdz, string krjg, string krdw, string krzy, string cxmd, string qzrx, string qzhm, string zjyxq, string tlyxq, string tjrq, string lzka, string krly, string xyh, string xydw, string xsy, string ddrx, string ddwz, string zyzt, string krrx, string kr_children, string ddsj, string lzts, string lksj, string qtyq, string czy, string czsj, string cznr, string sktt, string yddj, string main_sec, string yddj_rx, string syzd, string vip_type, string tsyq, string add_edit_delete, string xxzs, string ddly, string hykh_bz) { string s = common_file.common_app.get_failure; BLL.Qskyd_mainrecord B_Qskyd_mainrecord = new Hotel_app.BLL.Qskyd_mainrecord(); Model.Qskyd_mainrecord M_Qskyd_mainrecord = new Hotel_app.Model.Qskyd_mainrecord(); BLL.Qskyd_mainrecord_new B_Qskyd_mainrecord_new = new Hotel_app.BLL.Qskyd_mainrecord_new(); BLL.Ffjzt B_Ffjzt = new Hotel_app.BLL.Ffjzt(); Model.Ffjzt M_Ffjzt = new Hotel_app.Model.Ffjzt(); BLL.Qskyd_fjrb B_Qskyd_fjrb = new Hotel_app.BLL.Qskyd_fjrb(); Model.Qskyd_fjrb M_Qskyd_fjrb = new Hotel_app.Model.Qskyd_fjrb(); BLL.Common B_Common = new Hotel_app.BLL.Common(); if (add_edit_delete == common_file.common_app.get_add) { if (main_sec == common_file.common_app.main_sec_sec) { M_Qskyd_mainrecord = B_Qskyd_mainrecord.GetModel(int.Parse(id)); } M_Qskyd_mainrecord.yydh = yydh; M_Qskyd_mainrecord.qymc = qymc; M_Qskyd_mainrecord.syzd = syzd; M_Qskyd_mainrecord.lsbh = lsbh; M_Qskyd_mainrecord.ddbh = ddbh; M_Qskyd_mainrecord.hykh = hykh; M_Qskyd_mainrecord.hyrx = hyrx; M_Qskyd_mainrecord.krxm = krxm; M_Qskyd_mainrecord.tlkr = tlkr; M_Qskyd_mainrecord.krgj = krgj; M_Qskyd_mainrecord.krmz = krmz; M_Qskyd_mainrecord.yxzj = yxzj; M_Qskyd_mainrecord.zjhm = zjhm; M_Qskyd_mainrecord.krxb = krxb; M_Qskyd_mainrecord.krsr = Convert.ToDateTime(krsr); M_Qskyd_mainrecord.krdh = krdh; M_Qskyd_mainrecord.krsj = krsj; M_Qskyd_mainrecord.krEmail = krEmail; M_Qskyd_mainrecord.krdz = krdz; M_Qskyd_mainrecord.krjg = krjg; M_Qskyd_mainrecord.krdw = krdw; M_Qskyd_mainrecord.krzy = krzy; M_Qskyd_mainrecord.cxmd = cxmd; M_Qskyd_mainrecord.qzrx = qzrx; M_Qskyd_mainrecord.qzhm = qzhm; M_Qskyd_mainrecord.zjyxq = Convert.ToDateTime(zjyxq); M_Qskyd_mainrecord.tlyxq = Convert.ToDateTime(tlyxq); M_Qskyd_mainrecord.tjrq = Convert.ToDateTime(tjrq); M_Qskyd_mainrecord.czy = czy; M_Qskyd_mainrecord.czsj = Convert.ToDateTime(czsj); M_Qskyd_mainrecord.cznr = cznr; M_Qskyd_mainrecord.main_sec = main_sec; M_Qskyd_mainrecord.vip_type = vip_type; M_Qskyd_mainrecord.hykh_bz = hykh_bz; M_Qskyd_mainrecord.krrx = krrx; string krrx_0 = get_htk(krxm, zjhm); if (krrx_0 != "") { M_Qskyd_mainrecord.krrx = krrx_0; } if (main_sec == common_file.common_app.main_sec_main) { M_Qskyd_mainrecord.lzka = lzka; M_Qskyd_mainrecord.krly = krly; if (krly == "") { string krly_0 = get_hy(hykh); if (krly_0 != "") { M_Qskyd_mainrecord.krly = krly_0; } } M_Qskyd_mainrecord.xyh = xyh; M_Qskyd_mainrecord.xydw = xydw; M_Qskyd_mainrecord.xsy = xsy; M_Qskyd_mainrecord.ddrx = ddrx; M_Qskyd_mainrecord.ddwz = ddwz; M_Qskyd_mainrecord.zyzt = zyzt; M_Qskyd_mainrecord.kr_children = Convert.ToInt32(kr_children); M_Qskyd_mainrecord.ddsj = Convert.ToDateTime(ddsj); M_Qskyd_mainrecord.lzts = Convert.ToInt32(lzts); M_Qskyd_mainrecord.lksj = Convert.ToDateTime(lksj); M_Qskyd_mainrecord.qtyq = qtyq; M_Qskyd_mainrecord.sktt = sktt; M_Qskyd_mainrecord.yddj = yddj; M_Qskyd_mainrecord.tsyq = tsyq; M_Qskyd_mainrecord.ddly = ddly; } B_Qskyd_mainrecord.Add(M_Qskyd_mainrecord); { if (main_sec == common_file.common_app.main_sec_main) { Q_ff_xyxf Q_ff_xyxf_new = new Q_ff_xyxf(); Q_ff_xyxf_new.Qyddj_otherfee_add(yydh, qymc, lsbh, krxm, sktt, "", czy); } } s = common_file.common_app.get_suc; } else if (add_edit_delete == common_file.common_app.get_edit) { //M_Qskyd_mainrecord.id = int.Parse(id); M_Qskyd_mainrecord = B_Qskyd_mainrecord.GetModel(int.Parse(id)); DateTime ddsj_temp = M_Qskyd_mainrecord.ddsj; DateTime lksj_temp = M_Qskyd_mainrecord.lksj; string krxm_temp = M_Qskyd_mainrecord.krxm; DataSet DS_temp; string fjbh_temp = ""; DS_temp = B_Qskyd_fjrb.GetList("lsbh='" + M_Qskyd_mainrecord.lsbh + "'"); if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { fjbh_temp = DS_temp.Tables[0].Rows[0]["fjbh"].ToString(); if (fjbh_temp != "") { //这边要判断是否有一间房间,两个主单的情况,另外如抵离时间有变动,房态里的抵离时间也要跟着变动 if (yddj == common_file.common_yddj.yddj_yd) { if (ddsj_temp != DateTime.Parse(ddsj)) { //清除 if (ddsj_temp >= DateTime.Now.Date && ddsj_temp < DateTime.Now.Date.AddDays(1)) { //清除预订 Qyddj.Qskyd_fjrb_add_edit_delete Qskyd_fjrb_add_edit_delete_new = new Qskyd_fjrb_add_edit_delete(); s = Qskyd_fjrb_add_edit_delete_new.clear_old_yd_fjzt(fjbh_temp, M_Qskyd_mainrecord.ddsj, M_Qskyd_mainrecord.lksj, DateTime.Parse(czsj), czy, xxzs); } B_Common.ExecuteSql("update Qskyd_mainrecord set ddsj='" + ddsj + "',shsc=0,czsj='" + czsj + "' where lsbh in(select lsbh from View_Qskzd where fjbh='" + fjbh_temp + "' and ddsj='" + ddsj_temp + "' and lksj='" + lksj_temp + "')"); //B_Common.ExecuteSql("update Qskyd_fjrb set ddsj='" + ddsj + "',shsc=0,czsj='" + czsj + "' where lsbh in(select lsbh from View_Qskzd where fjbh='" + fjbh_temp + "' and ddsj='" + ddsj_temp + "' and lksj='" + lksj_temp + "')"); //判断新的预订是否要改房态 if (DateTime.Parse(ddsj) >= DateTime.Now.Date && DateTime.Parse(ddsj) < DateTime.Now.Date.AddDays(1)) { Qyddj.Qskyd_fjrb_add_edit_delete Qskyd_fjrb_add_edit_delete_new = new Qskyd_fjrb_add_edit_delete(); Qskyd_fjrb_add_edit_delete_new.add_fjbh_yd_fjzt(M_Qskyd_mainrecord.lsbh, fjbh_temp, M_Qskyd_mainrecord.sktt, DateTime.Parse(czsj), czy, xxzs); } } if (lksj_temp != DateTime.Parse(lksj)) { string s_temp = "update Qskyd_mainrecord set lksj='" + lksj + "',shsc=0,czsj='" + czsj + "' where lsbh in(select lsbh from View_Qskzd where fjbh='" + fjbh_temp + "' and ddsj='" + ddsj + "' and lksj='" + lksj_temp + "')"; B_Common.ExecuteSql(s_temp); //B_Common.ExecuteSql("update Qskyd_fjrb set lksj='" + lksj + "',shsc=0,czsj='" + czsj + "' where lsbh in(select lsbh from View_Qskzd where fjbh='" + fjbh_temp + "' and ddsj='" + ddsj_temp + "' and lksj='" + lksj_temp + "')"); s_temp = "update Ffjzt set yd_lksj='" + lksj + "',czsj='" + DateTime.Now.ToString() + "' where fjbh='" + fjbh_temp + "' and yd_ddsj='" + ddsj + "' and yd_lksj='" + lksj_temp + "'"; B_Common.ExecuteSql(s_temp); } } else if (yddj == common_file.common_yddj.yddj_dj) { if (lksj_temp != DateTime.Parse(lksj)) { B_Common.ExecuteSql("update Qskyd_mainrecord set lksj='" + lksj + "',shsc=0,czsj='" + czsj + "' where lsbh in(select lsbh from View_Qskzd where fjbh='" + fjbh_temp + "' and ddsj='" + ddsj_temp + "' and lksj='" + lksj_temp + "')"); // B_Common.ExecuteSql("update Qskyd_fjrb set lksj='" + lksj + "',shsc=0,czsj='" + czsj + "' where lsbh in(select lsbh from View_Qskzd where fjbh='" + fjbh_temp + "' and ddsj='" + ddsj_temp + "' and lksj='" + lksj_temp + "')"); B_Common.ExecuteSql("update Ffjzt set lksj='" + lksj + "',czsj='" + DateTime.Now.ToString() + "' where fjbh='" + fjbh_temp + "' and ddsj='" + ddsj_temp + "' and lksj='" + lksj_temp + "'"); } } } } DS_temp.Dispose(); M_Qskyd_mainrecord.yydh = yydh; M_Qskyd_mainrecord.qymc = qymc; M_Qskyd_mainrecord.lsbh = lsbh; M_Qskyd_mainrecord.ddbh = ddbh; M_Qskyd_mainrecord.hykh = hykh; M_Qskyd_mainrecord.hyrx = hyrx; M_Qskyd_mainrecord.krxm = krxm; M_Qskyd_mainrecord.tlkr = tlkr; M_Qskyd_mainrecord.krgj = krgj; M_Qskyd_mainrecord.krmz = krmz; M_Qskyd_mainrecord.yxzj = yxzj; M_Qskyd_mainrecord.zjhm = zjhm; M_Qskyd_mainrecord.krxb = krxb; M_Qskyd_mainrecord.krsr = Convert.ToDateTime(krsr); M_Qskyd_mainrecord.krdh = krdh; if (M_Qskyd_mainrecord.ddyy != common_file.common_app.ydzx_flag) { M_Qskyd_mainrecord.xsy = xsy; M_Qskyd_mainrecord.xyh = xyh; M_Qskyd_mainrecord.xydw = xydw; M_Qskyd_mainrecord.krly = krly; } //if(M_Qskyd_mainrecord.ddyy != common_file.common_app.ydzx_flage&&M_Qskyd_mainrecord.krly != common_file.common_app.krly_xydw_flage) //{ // M_Qskyd_mainrecord.xsy = xsy; // } M_Qskyd_mainrecord.krsj = krsj; M_Qskyd_mainrecord.krEmail = krEmail; M_Qskyd_mainrecord.krdz = krdz; M_Qskyd_mainrecord.krjg = krjg; M_Qskyd_mainrecord.krdw = krdw; M_Qskyd_mainrecord.krzy = krzy; M_Qskyd_mainrecord.cxmd = cxmd; M_Qskyd_mainrecord.qzrx = qzrx; M_Qskyd_mainrecord.qzhm = qzhm; M_Qskyd_mainrecord.zjyxq = Convert.ToDateTime(zjyxq); M_Qskyd_mainrecord.tlyxq = Convert.ToDateTime(tlyxq); M_Qskyd_mainrecord.tjrq = Convert.ToDateTime(tjrq); M_Qskyd_mainrecord.lzka = lzka; if (krly == "") { string krly_0 = get_hy(hykh); if (krly_0 != "") { M_Qskyd_mainrecord.krly = krly_0; } } M_Qskyd_mainrecord.ddrx = ddrx; M_Qskyd_mainrecord.ddwz = ddwz; M_Qskyd_mainrecord.zyzt = zyzt; M_Qskyd_mainrecord.krrx = krrx; string krrx_0 = get_htk(krxm, zjhm); if (krrx_0 != "") { M_Qskyd_mainrecord.krrx = krrx_0; } M_Qskyd_mainrecord.kr_children = Convert.ToInt32(kr_children); if (M_Qskyd_mainrecord.yddj != common_file.common_yddj.yddj_dj) { M_Qskyd_mainrecord.ddsj = Convert.ToDateTime(ddsj); } M_Qskyd_mainrecord.lzts = Convert.ToInt32(lzts); M_Qskyd_mainrecord.lksj = Convert.ToDateTime(lksj); M_Qskyd_mainrecord.qtyq = qtyq; M_Qskyd_mainrecord.czy = czy; M_Qskyd_mainrecord.czsj = Convert.ToDateTime(czsj); M_Qskyd_mainrecord.cznr = cznr; //M_Qskyd_mainrecord.sktt = sktt; //M_Qskyd_mainrecord.yddj = yddj; //M_Qskyd_mainrecord.main_sec = main_sec; M_Qskyd_mainrecord.vip_type = vip_type; M_Qskyd_mainrecord.tsyq = tsyq; M_Qskyd_mainrecord.ddly = ddly; M_Qskyd_mainrecord.hykh_bz = hykh_bz; //common_file.common_Qskyd_mainrecord.PlInter(int.Parse(id), "修改");//删除前批量添加到备份表里 B_Qskyd_mainrecord_new.Pladd(int.Parse(id), common_file.common_app.chinese_edit, "", czy, czsj, "xg", ""); B_Qskyd_mainrecord.Update(M_Qskyd_mainrecord); fjbh_temp = ""; string shlf_temp = "0"; bool shlf0 = common_file.common_fjzt.Islf(M_Qskyd_mainrecord.lsbh); if (shlf0 == true) { shlf_temp = "1"; } string shts_temp = "0"; bool shts0 = common_file.common_fjzt.Ists(M_Qskyd_mainrecord.lsbh); if (shts0 == true) { shts_temp = "1"; } string shvip_temp = "0"; bool shvip0 = common_file.common_fjzt.IsVIP(M_Qskyd_mainrecord.lsbh); if (shvip0 == true) { shvip_temp = "1"; } string fjbm_temp = "0"; bool fjbm0 = common_file.common_fjzt.Isbm(M_Qskyd_mainrecord.lsbh); if (fjbm0 == true) { fjbm_temp = "1"; } string krxm0 = M_Qskyd_mainrecord.krxm; if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0) { fjbh_temp = DS_temp.Tables[0].Rows[0]["fjbh"].ToString(); if (yddj == common_file.common_yddj.yddj_dj) { B_Common.ExecuteSql("update Ffjzt set krxm='" + krxm0 + "',shlf='" + shlf_temp + "',shts='" + shts_temp + "',shvip='" + shvip_temp + "',fjbm='" + fjbm_temp + "',czsj='" + DateTime.Now.ToString() + "' where fjbh='" + fjbh_temp + "'"); } else if (yddj == common_file.common_yddj.yddj_yd) { B_Common.ExecuteSql("update Ffjzt set krxm='" + krxm0 + "',shlf='" + shlf_temp + "',shts='" + shts_temp + "',shvip='" + shvip_temp + "',fjbm='" + fjbm_temp + "',czsj='" + DateTime.Now.ToString() + "' where fjbh='" + fjbh_temp + "' and yd_ddsj='" + M_Qskyd_mainrecord.ddsj + "' and yd_lksj='" + M_Qskyd_mainrecord.lksj + "' and zyzt<>'" + common_file.common_fjzt.zzf + "'"); } } s = common_file.common_app.get_suc; } else if (add_edit_delete == common_file.common_app.get_delete) { s = delete_sz_xgft(id, "sc", cznr, qtyq, "", czy, czsj, xxzs); //通过qtyq传递取消原因过来 } return(s); }