温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:Extjs简单版酒店管理系统
当前文件:
ExtjsHotelManage/BLL/OpenRoomRecordInfoBLL.cs[2K,2009-6-12 11:42:12],打开代码结构图
ExtjsHotelManage/BLL/OpenRoomRecordInfoBLL.cs[2K,2009-6-12 11:42:12],打开代码结构图1using System; 2
using System.Collections.Generic; 3
using System.Text; 4
using Model; 5
using DAL; 6
using System.Data; 7
8
namespace BLL 9
{ 10
public class OpenRoomRecordInfoBLL 11
{ 12
OpenRoomRecordInfoDAO dao = new OpenRoomRecordInfoDAO(); 13
14
private DataSet ds; 15
//房费总额 16
public string GetRoomMoney(string roomid) 17
{ 18
FormJSONHelper json = new FormJSONHelper(); 19
string money= dao.GetRoomMoney(roomid); 20
json.success = true; 21
json.AddItem("roommoney",money); 22
json.ItemOk(); 23
string allmoney = json.ToString(); 24
return allmoney; 25
} 26
27
//分页得到开房记录 28
public string GetOpenRoomRecordInfos(int start,int limit,string message) 29
{ 30
JSONHelper json = new JSONHelper(); 31
json.success = true; 32
string jsons = ""; 33
if (message == null || message.Trim().Length == 0 ||message=="开房/退房(日期/时间)/备注信息") 34
{ 35
ds = dao.GetOpenRoomInfo(start, limit); 36
foreach(DataRow dr in ds.Tables[0].Rows) 37
{ 38
json.AddItem("recordid", dr["recordid"].ToString()); 39
json.AddItem("roomid", dr["roomid"].ToString()); 40
json.AddItem("guestid", dr["guestid"].ToString()); 41
json.AddItem("guestmoney", dr["guestmoney"].ToString()); 42
json.AddItem("opentodaytime", dr["opentodaytime"].ToString()); 43
json.AddItem("opentime", dr["opentime"].ToString()); 44
json.AddItem("endtodaytime", dr["endtodaytime"].ToString()); 45
json.AddItem("endtime", dr["endtime"].ToString()); 46
json.AddItem("remark", dr["remark"].ToString()); 47
json.ItemOk(); 48
} 49
json.totlalCount = dao.GetAllCountOpenRoomRecord(); 50
jsons = json.ToString(); 51
} 52
else 53
{ 54
ds = dao.GetOpenRoomInfoAll(message); 55
foreach (DataRow dr in ds.Tables[0].Rows) 56
{ 57
json.AddItem("recordid", dr["recordid"].ToString()); 58
json.AddItem("roomid", dr["roomid"].ToString()); 59
json.AddItem("guestid", dr["guestid"].ToString()); 60
json.AddItem("guestmoney", dr["guestmoney"].ToString()); 61
json.AddItem("opentodaytime", dr["opentodaytime"].ToString()); 62
json.AddItem("opentime", dr["opentime"].ToString()); 63
json.AddItem("endtodaytime", dr["endtodaytime"].ToString()); 64
json.AddItem("endtime", dr["endtime"].ToString()); 65
json.AddItem("remark", dr["remark"].ToString()); 66
json.ItemOk(); 67
} 68
jsons = json.ToString(); 69
} 70
return jsons; 71
} 72
} 73
} 74






}
}