//结帐时的帐务 public void GetZwmx(string lsbh, string sktt, string czy_GUID, string sel_con) { sql = "delete from Szw_temp where id>=0 " + common_file.common_app.yydh_select + " and czy_temp='" + czy_GUID + "'"; if (sel_con.Trim() != "") { sql = sql + sel_con; } B_common.ExecuteSql(sql); // list_lsbh = new List<string>(); if (sktt == "sk")//散客考虑联房 { System.Text.StringBuilder strSql = new System.Text.StringBuilder(); //检查当前的lsbh是否存在于lfsz表里面 ds_temp = B_Flfsz.GetList(" id>=0 " + common_file.common_app.yydh_select + " and lsbh='" + lsbh + "' and fjbh!='' and shlz=1 "); if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 0) { //联房并且有联帐(2012-03-02华都会议更新,数据库有新增一个连帐的功能,这间有加到联房里面(获取此lfbh下所有的lsbh--查找押金和消费明细 lfbh_temp = ds_temp.Tables[0].Rows[0]["lfbh"].ToString(); ds_temp = B_Flfsz.GetList("id>=0 " + common_file.common_app.yydh_select + " and lfbh='" + lfbh_temp + "' and fjbh!='' and shlz=1 "); list_lsbh = new List <string>(); for (int i = 0; i < ds_temp.Tables[0].Rows.Count; i++) { if (ds_temp.Tables[0].Rows[i]["lsbh"].ToString() != lsbh) { list_lsbh.Add(ds_temp.Tables[0].Rows[i]["lsbh"].ToString());//所有的临时编号 } } list_lsbh.Add(lsbh);//注意,要先加上自己 foreach (string lsbh_temp in list_lsbh) { SearchData(lsbh_temp, czy_GUID); } } else//没有联房,直接查找 { SearchData(lsbh, czy_GUID); } } if (sktt == "tt")//获取所有成员的帐务 { //成员帐务都结清,团体可以进行结帐 SearchData(lsbh, czy_GUID); } }
public static bool Islf(string lsbh)//是否联房 { bool sflf = false; BLL.Flfsz B_flfsz = new Hotel_app.BLL.Flfsz(); DataSet ds = B_flfsz.GetList("lsbh='" + lsbh + "' and shlz=1"); if (ds.Tables[0].Rows.Count > 0) { sflf = true; } else { sflf = false; } return(sflf); }