本文整理汇总了C#中BussinessLogic.ReceptionTaskBO.GetAddTimeEnd方法的典型用法代码示例。如果您正苦于以下问题:C# ReceptionTaskBO.GetAddTimeEnd方法的具体用法?C# ReceptionTaskBO.GetAddTimeEnd怎么用?C# ReceptionTaskBO.GetAddTimeEnd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BussinessLogic.ReceptionTaskBO
的用法示例。
在下文中一共展示了ReceptionTaskBO.GetAddTimeEnd方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: txtAddTimeStart_EditValueChanged
private void txtAddTimeStart_EditValueChanged(object sender, EventArgs e)
{
if (this.CurrentIDBookingRoom > 0)
{
ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
int NewTypeBookingRoom = this.ConvertTypeBookingRoom(chkCheckIn.Checked, chkCheckOut.Checked);
this.aNewPaymentEN.ChangeTypeBookingRoom(this.CurrentIDBookingRoom, NewTypeBookingRoom);
this.aNewPaymentEN.aListBookingRoomUsed.Where(a => a.ID == this.CurrentIDBookingRoom).ToList()[0].AddTimeStart = aReceptionTaskBO.GetAddTimeStart(NewTypeBookingRoom, dtpCheckInActual.DateTime);
this.aNewPaymentEN.aListBookingRoomUsed.Where(a => a.ID == this.CurrentIDBookingRoom).ToList()[0].AddTimeEnd = aReceptionTaskBO.GetAddTimeEnd(NewTypeBookingRoom, dtpCheckOutActual.DateTime);
this.ShowControlAutoCost(this.aNewPaymentEN.GetTypeBookingRoom(this.CurrentIDBookingRoom));
this.LoadDataCurrentRoomForControl();
}
}
示例2: InitData
// ===============================================================================
// Khoi tao doi tuong Payment
private void InitData(int IDBookingR, int IDBookingH)
{
CompaniesBO aCompaniesBO = new CompaniesBO();
CustomerGroupsBO aCustomerGroupsBO = new CustomerGroupsBO();
SystemUsersBO aSystemUsersBO = new SystemUsersBO();
BookingHsBO aBookingHsBO = new BookingHsBO();
BookingRsBO aBookingRsBO = new BookingRsBO();
BookingRoomsBO aBookingRoomBO = new BookingRoomsBO();
CustomersBO aCustomersBO = new CustomersBO();
ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
RoomsBO aRoomsBO = new RoomsBO();
HallsBO aHallsBO = new HallsBO();
BookingHallsBO aBookingHallsBO = new BookingHallsBO();
FoodsBO aFoodsBO = new FoodsBO();
ExtraCostBO aExtraCostBO = new ExtraCostBO();
List<int> aListIndexTemp = new List<int>();
BookingHs aBookingHs = new BookingHs();
BookingRs aBookingRs = aBookingRsBO.Select_ByID(IDBookingR);
if (this.IDBookingH > 0)
{
aBookingHs = aBookingHsBO.Select_ByID(this.IDBookingH);
}
else
{
BookingRs_BookingHs aItem = (new BookingRs_BookingHsBO()).Select_ByIDBookingR(this.IDBookingR);
if (aItem != null)
{
this.IDBookingH = aItem.IDBookingH.GetValueOrDefault(0);
aBookingHs = aBookingHsBO.Select_ByID(this.IDBookingH);
}
}
// Truyen du lieu chung cua NewPayment
if (aBookingRs != null)
{
aNewPaymentEN.IDBookingR = aBookingRs.ID;
aNewPaymentEN.IDCustomer = aBookingRs.IDCustomer;
Customers aCustomers = aCustomersBO.Select_ByID(aBookingRs.IDCustomer);
if (aCustomers != null)
{
aNewPaymentEN.NameCustomer = aCustomers.Name;
}
aNewPaymentEN.IDSystemUser = aBookingRs.IDSystemUser;
SystemUsers aSystemUsers = aSystemUsersBO.Select_ByID(aBookingRs.IDSystemUser);
if (aSystemUsers != null)
{
aNewPaymentEN.NameSystemUser = aSystemUsers.Name;
}
aNewPaymentEN.IDCustomerGroup = aBookingRs.IDCustomerGroup;
CustomerGroups aCustomerGroups = aCustomerGroupsBO.Select_ByID(aBookingRs.IDCustomerGroup);
if (aCustomerGroups != null)
{
aNewPaymentEN.NameCustomerGroup = aCustomerGroups.Name;
aNewPaymentEN.IDCompany = aCustomerGroups.IDCompany;
Companies aCompanies = aCompaniesBO.Select_ByID(aCustomerGroups.IDCompany);
if (aCompanies != null)
{
aNewPaymentEN.NameCompany = aCompanies.Name;
aNewPaymentEN.TaxNumberCodeCompany = aCompanies.TaxNumberCode;
aNewPaymentEN.AddressCompany = aCompanies.Address;
}
}
aNewPaymentEN.PayMenthodR = aBookingRs.PayMenthod;
aNewPaymentEN.CreatedDate_BookingR = aBookingRs.CreatedDate;
aNewPaymentEN.CustomerType = aBookingRs.CustomerType;
aNewPaymentEN.Status_BookingR = aBookingRs.Status;
aNewPaymentEN.StatusPay = aBookingRs.StatusPay;
aNewPaymentEN.BookingRMoney = aBookingRs.BookingMoney;
aNewPaymentEN.Status_BookingR = aBookingRs.Status;
aNewPaymentEN.AcceptDate = aBookingRs.AcceptDate;
aNewPaymentEN.InvoiceDate = aBookingRs.InvoiceDate;
aNewPaymentEN.InvoiceNumber = aBookingRs.InvoiceNumber;
// Truyen du lieu cho List BookingRoom cua NewPayment
List<BookingRooms> aListBookingRooms = aBookingRoomBO.Select_ByIDBookingRs(this.IDBookingR);
if (aListBookingRooms.Count > 0)
{
BookingRoomUsedEN aBookingRoomUsedEN;
foreach (BookingRooms item in aListBookingRooms)
{
aBookingRoomUsedEN = new BookingRoomUsedEN();
aBookingRoomUsedEN.SetValue(item);
aBookingRoomUsedEN.ListCustomer = aCustomersBO.SelectListCustomer_ByIDBookingRoom(item.ID);
Rooms aRooms = aRoomsBO.Select_ByCodeRoom(item.CodeRoom, 1);
if (aRooms != null)
{
aBookingRoomUsedEN.RoomSku = aRooms.Sku;
}
else
{
aBookingRoomUsedEN.RoomSku = string.Empty;
}
if (item.Status == 8 || item.Status == 7)
{
aBookingRoomUsedEN.AddTimeStart = Convert.ToDouble(aReceptionTaskBO.GetAddTimeStart(Convert.ToInt32(item.Type), item.CheckInActual));
aBookingRoomUsedEN.AddTimeEnd = Convert.ToDouble(aReceptionTaskBO.GetAddTimeEnd(Convert.ToInt32(item.Type), item.CheckOutActual));
//.........这里部分代码省略.........
示例3: LoadDataCurrentRoomForControl
//Load lai du lieu cho cac control moi khi select vao 1 phong moi
// Ngoc - done
private void LoadDataCurrentRoomForControl()
{
if (this.aNewPaymentEN.aListBookingRoomUsed.Where(a => a.ID == this.CurrentIDBookingRoom).ToList().Count > 0)
{
BookingRoomUsedEN aBookingRoomUsedEN = this.aNewPaymentEN.aListBookingRoomUsed.Where(a => a.ID == this.CurrentIDBookingRoom).ToList()[0];
/*Ghi chu TypeBookingRooms
* Type = 2: //Tính checkin sớm , không tính checkout muộn.
* Type = 0: //Không tính checkIn sớm và checkout muộn.
* Type = 3: //Tính checkin sớm và Checkout muộn
* Type = 1: //Không tính checkin sớm , tính checkout muộn
*/
ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
if (aBookingRoomUsedEN.Status == 1 || aBookingRoomUsedEN.Status == 2)
{
dtpCheckInActual.DateTime = aBookingRoomUsedEN.CheckInPlan;
dtpCheckOutActual.DateTime = aBookingRoomUsedEN.CheckOutPlan;
txtNumberDate.Text = ""; // Phong chua su dung
txtAddTimeEnd.Text = "";
txtAddTimeStart.Text = "";
lblCI.Text = "CI dự kiến";
lblCO.Text = "CO dự kiến";
lblCaptionStatusRoom.Text = ("Phòng " + aBookingRoomUsedEN.RoomSku + " đang ở trạng thái đặt").ToUpper();
}
else if (aBookingRoomUsedEN.Status == 3)
{
dtpCheckInActual.DateTime = aBookingRoomUsedEN.CheckInActual;
dtpCheckOutActual.DateTime = aBookingRoomUsedEN.CheckOutPlan;
txtNumberDate.Text = aReceptionTaskBO.GetTimeInUsed(aBookingRoomUsedEN.CheckInActual, aBookingRoomUsedEN.CheckOutPlan).ToString();
txtAddTimeEnd.Text = aReceptionTaskBO.GetAddTimeEnd(aBookingRoomUsedEN.Type.GetValueOrDefault(0), aBookingRoomUsedEN.CheckOutPlan).ToString();
txtAddTimeStart.Text = aReceptionTaskBO.GetAddTimeStart(aBookingRoomUsedEN.Type.GetValueOrDefault(0), aBookingRoomUsedEN.CheckInActual).ToString();
lblCI.Text = "CI thực tế";
lblCO.Text = "CO dự kiến";
lblCaptionStatusRoom.Text = ("Phòng " + aBookingRoomUsedEN.RoomSku + " đang có người ở").ToUpper();
}
else if (aBookingRoomUsedEN.Status == 5)
{
dtpCheckInActual.DateTime = aBookingRoomUsedEN.CheckInActual;
dtpCheckOutActual.DateTime = aBookingRoomUsedEN.CheckOutPlan;
txtNumberDate.Text = aReceptionTaskBO.GetTimeInUsed(aBookingRoomUsedEN.CheckInActual, aBookingRoomUsedEN.CheckOutPlan).ToString();
txtAddTimeEnd.Text = aReceptionTaskBO.GetAddTimeEnd(aBookingRoomUsedEN.Type.GetValueOrDefault(0), aBookingRoomUsedEN.CheckOutPlan).ToString();
txtAddTimeStart.Text = aReceptionTaskBO.GetAddTimeStart(aBookingRoomUsedEN.Type.GetValueOrDefault(0), aBookingRoomUsedEN.CheckInActual).ToString();
lblCI.Text = "CI thực tế";
lblCO.Text = "CO dự kiến";
lblCaptionStatusRoom.Text = ("Phòng " + aBookingRoomUsedEN.RoomSku + " đang khóa").ToUpper();
}
else if (aBookingRoomUsedEN.Status == 7)
{
dtpCheckInActual.DateTime = aBookingRoomUsedEN.CheckInActual;
dtpCheckOutActual.DateTime = aBookingRoomUsedEN.CheckOutActual;
txtNumberDate.Text = aReceptionTaskBO.GetTimeInUsed(aBookingRoomUsedEN.CheckInActual, aBookingRoomUsedEN.CheckOutActual).ToString();
txtAddTimeEnd.Text = aReceptionTaskBO.GetAddTimeEnd(aBookingRoomUsedEN.Type.GetValueOrDefault(0), aBookingRoomUsedEN.CheckOutActual).ToString();
txtAddTimeStart.Text = aReceptionTaskBO.GetAddTimeStart(aBookingRoomUsedEN.Type.GetValueOrDefault(0), aBookingRoomUsedEN.CheckInActual).ToString();
lblCI.Text = "CI thực tế";
lblCO.Text = "CO thực tế";
lblCaptionStatusRoom.Text = ("Phòng " + aBookingRoomUsedEN.RoomSku + " đã checkout nhưng chưa thanh toán").ToUpper();
}
else if (aBookingRoomUsedEN.Status == 8)
{
dtpCheckInActual.DateTime = aBookingRoomUsedEN.CheckInActual;
dtpCheckOutActual.DateTime = aBookingRoomUsedEN.CheckOutActual;
// Neu phong da dc thanh toan tuc la thong tin phong da chot. Vay lay thong tin nay de hien thi
txtNumberDate.Text = (aBookingRoomUsedEN.TimeInUse.GetValueOrDefault(0)/(24*60)).ToString();
txtAddTimeEnd.Text = aBookingRoomUsedEN.AddTimeEnd.ToString();
txtAddTimeStart.Text = aBookingRoomUsedEN.AddTimeStart.ToString();
lblCI.Text = "CI thực tế";
lblCO.Text = "CO thực tế";
lblCaptionStatusRoom.Text = ("Phòng " + aBookingRoomUsedEN.RoomSku + " đã thanh toán").ToUpper();
}
lblSkuRooms.Text = aBookingRoomUsedEN.RoomSku;
txtPercentTax_Room.Text = Convert.ToString(aBookingRoomUsedEN.PercentTax);
lblMoneyRoom.Text = String.Format("{0:0,0} (VND)", this.aNewPaymentEN.GetOnlyMoneyRoom(aBookingRoomUsedEN.ID));
if (string.IsNullOrEmpty(aBookingRoomUsedEN.Cost.ToString()) == false)
{
txtBookingRoomsCost.EditValue = aBookingRoomUsedEN.Cost;
}
else
{
txtBookingRoomsCost.EditValue = aAccountancyBO.CalculateCostRoom(this.CurrentIDBookingRoom, aBookingRoomUsedEN.PriceType, this.aNewPaymentEN.CustomerType.GetValueOrDefault(0), this.aNewPaymentEN.GetNumberCustomerInRoom(this.CurrentIDBookingRoom));
}
// Danh sách khách
dgvCustomers.DataSource = aBookingRoomUsedEN.ListCustomer;
dgvCustomers.RefreshDataSource();
// Danh sách dịch vụ
dgvServicesR.DataSource = aNewPaymentEN.GetListServiceUsedInRoom(aBookingRoomUsedEN.ID);
//.........这里部分代码省略.........
示例4: CheckOut
public void CheckOut(int IDBookingRoom)
{
try
{
RoomsBO aRoomsBO = new RoomsBO();
ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
ExtraCostBO aExtraCostBO = new ExtraCostBO();
BookingRoomsBO aBookingRoomsBO = new BookingRoomsBO();
BookingRoomsMembersBO aBookingRoomsMembersBO = new BookingRoomsMembersBO();
BookingRooms aBookingRooms = aBookingRoomsBO.Select_ByID(IDBookingRoom);
List<BookingRoomsMembers> aListCus = aBookingRoomsMembersBO.Select_ByIDBookingRoom(IDBookingRoom);
aBookingRooms.CheckOutActual = DateTime.Now;
aBookingRooms.Status = 7;
aBookingRooms.AddTimeStart = Convert.ToDouble(aReceptionTaskBO.GetAddTimeStart(aBookingRooms.Type.GetValueOrDefault(0), aBookingRooms.CheckInActual));
aBookingRooms.AddTimeEnd = Convert.ToDouble(aReceptionTaskBO.GetAddTimeEnd(aBookingRooms.Type.GetValueOrDefault(0), aBookingRooms.CheckOutActual));
aBookingRooms.TimeInUse = Convert.ToDecimal(aReceptionTaskBO.GetTimeInUsed(aBookingRooms.CheckInActual, aBookingRooms.CheckOutActual) * 24 * 60);
Rooms aRooms = aRoomsBO.Select_ByCodeRoom(aBookingRooms.CodeRoom, 1);
if (aRooms != null)
{
if (aBookingRooms.Cost == null)
{
decimal? cost = 0;
cost = aBookingRooms.CostRef_Rooms;
aBookingRooms.Cost = cost + Convert.ToDecimal(aExtraCostBO.Select_BySku_ByPriceType_ByNumberPeople(aRooms.Sku, aBookingRooms.PriceType, aListCus.Count).ExtraValue);
}
}
aBookingRoomsBO.Update(aBookingRooms);
}
catch (Exception ex)
{
throw new Exception("AccountancyBO.CheckOut\n" + ex.ToString());
}
}
示例5: chkCheckOut_CheckedChanged
//Ngoc - done
private void chkCheckOut_CheckedChanged(object sender, EventArgs e)
{
ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
//if (chkCheckOut.Checked == true && this.CurrentIDBookingRoom != 0)
//{
// if (dtpCheckOutActual.Text != "")
// {
// txtAddTimeEnd.Text = aReceptionTaskBO.GetAddTimeEnd(dtpCheckOutActual.DateTime).ToString();
// }
//}
//else if (chkCheckOut.Checked == false && this.CurrentIDBookingRoom != 0)
//{
// txtAddTimeEnd.Text = "0";
//}
//// luu thong ti vao khoi payment va doi Type cua phong tuong ung
int NewTypeBookingRoom = this.ConvertTypeBookingRoom(chkCheckIn.Checked, chkCheckOut.Checked);
this.aNewPaymentEN.ChangeTypeBookingRoom(this.CurrentIDBookingRoom, NewTypeBookingRoom);
this.aNewPaymentEN.aListBookingRoomUsed.Where(a => a.ID == this.CurrentIDBookingRoom).ToList()[0].AddTimeEnd = aReceptionTaskBO.GetAddTimeEnd(NewTypeBookingRoom, dtpCheckOutActual.DateTime);
this.ShowControlAutoCost(this.aNewPaymentEN.GetTypeBookingRoom(this.CurrentIDBookingRoom));
this.LoadDataCurrentRoomForControl();
}
示例6: LoadDataCurrentRoomForControl
//Load lai du lieu cho cac control moi khi select vao 1 phong moi
// Ngoc - done
private void LoadDataCurrentRoomForControl()
{
if (this.aNewPaymentEN.aListBookingRoomUsed.Where(a => a.ID == this.CurrentIDBookingRoom).ToList().Count > 0)
{
BookingRoomUsedEN aBookingRoomUsedEN = this.aNewPaymentEN.aListBookingRoomUsed.Where(a => a.ID == this.CurrentIDBookingRoom).ToList()[0];
/*Ghi chu TypeBookingRooms
* Type = 2: //Tính checkin sớm , không tính checkout muộn.
* Type = 0: //Không tính checkIn sớm và checkout muộn.
* Type = 3: //Tính checkin sớm và Checkout muộn
* Type = 1: //Không tính checkin sớm , tính checkout muộn
*/
ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
this.ShowControlAutoCost(aBookingRoomUsedEN.Type.GetValueOrDefault(0));
if (aBookingRoomUsedEN.Status == 1 || aBookingRoomUsedEN.Status == 2)
{
dtpCheckInActual.DateTime = aBookingRoomUsedEN.CheckInPlan;
dtpCheckOutActual.DateTime = aBookingRoomUsedEN.CheckOutPlan;
txtNumberDate.Text = "" ; // Phong chua su dung
txtAddTimeEnd.Text = "";
txtAddTimeStart.Text = "";
lblCI.Text = "CI dự kiến";
lblCO.Text = "CO dự kiến";
}
else if (aBookingRoomUsedEN.Status == 3 || aBookingRoomUsedEN.Status == 4 || aBookingRoomUsedEN.Status == 5)
{
dtpCheckInActual.DateTime = aBookingRoomUsedEN.CheckInActual;
dtpCheckOutActual.DateTime = aBookingRoomUsedEN.CheckOutPlan;
txtNumberDate.Text = aReceptionTaskBO.GetTimeInUsed(aBookingRoomUsedEN.CheckInActual, aBookingRoomUsedEN.CheckOutPlan).ToString();
txtAddTimeEnd.Text = aReceptionTaskBO.GetAddTimeEnd(aBookingRoomUsedEN.Type.GetValueOrDefault(0), aBookingRoomUsedEN.CheckOutPlan).ToString();
txtAddTimeStart.Text = aReceptionTaskBO.GetAddTimeStart(aBookingRoomUsedEN.Type.GetValueOrDefault(0), aBookingRoomUsedEN.CheckInActual).ToString();
lblCI.Text = "CI thực tế";
lblCO.Text = "CO dự kiến";
}
else if (aBookingRoomUsedEN.Status == 8 || aBookingRoomUsedEN.Status == 7)
{
dtpCheckInActual.DateTime = aBookingRoomUsedEN.CheckInActual;
dtpCheckOutActual.DateTime = aBookingRoomUsedEN.CheckOutActual;
txtNumberDate.Text = aReceptionTaskBO.GetTimeInUsed(aBookingRoomUsedEN.CheckInActual, aBookingRoomUsedEN.CheckOutActual).ToString();
txtAddTimeEnd.Text = aReceptionTaskBO.GetAddTimeEnd(aBookingRoomUsedEN.Type.GetValueOrDefault(0), aBookingRoomUsedEN.CheckOutActual).ToString();
txtAddTimeStart.Text = aReceptionTaskBO.GetAddTimeStart(aBookingRoomUsedEN.Type.GetValueOrDefault(0), aBookingRoomUsedEN.CheckInActual).ToString();
lblCI.Text = "CI thực tế";
lblCO.Text = "CO thực tế";
}
lblSkuRooms.Text = aBookingRoomUsedEN.RoomSku;
txtPercentTax_Room.Text = Convert.ToString(aBookingRoomUsedEN.PercentTax);
lblMoneyRoom.Text = String.Format("{0:0,0} (VND)", this.aNewPaymentEN.GetMoneyARoom(aBookingRoomUsedEN.ID));
if (string.IsNullOrEmpty(aBookingRoomUsedEN.Cost.ToString()) == false)
{
txtBookingRoomsCost.EditValue = aBookingRoomUsedEN.Cost;
}
else
{
txtBookingRoomsCost.EditValue = aAccountancyBO.CalculateCostRoom(this.CurrentIDBookingRoom, aBookingRoomUsedEN.PriceType, this.aNewPaymentEN.CustomerType.GetValueOrDefault(0), this.aNewPaymentEN.GetNumberCustomerInRoom(this.CurrentIDBookingRoom));
}
// Danh sách khách
dgvCustomers.DataSource = aBookingRoomUsedEN.ListCustomer;
dgvCustomers.RefreshDataSource();
// Danh sách dịch vụ
dgvServices.DataSource = aNewPaymentEN.GetListServiceUsedInRoom(aBookingRoomUsedEN.ID);
dgvServices.RefreshDataSource();
lblTotalMoneyService.Text = String.Format("{0:0,0} (VND)", this.aNewPaymentEN.GetMoneyListServiceUsedInARoom(aBookingRoomUsedEN.ID));
//=========================================
// Load lai control khac
this.LoadData();
}
}
示例7: CheckOutFirstRoom
//Ngoc
public int CheckOutFirstRoom(int IDBookingRoom, DateTime CheckOut)
{
try
{
/*Ghi chu TypeBookingRooms
*
* Type = 2: //Tính checkin sớm , không tính checkout muộn.
* Type = 0: //Không tính checkIn sớm và checkout muộn.
* Type = 3: //Tính checkin sớm và Checkout muộn
* Type = 1: //Không tính checkin sớm , tính checkout muộn
*/
ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
BookingRoomsBO aBookingRoomsBO = new BookingRoomsBO();
BookingRooms aBookingRooms = aBookingRoomsBO.Select_ByID(IDBookingRoom);
if (aBookingRooms != null)
{
aBookingRooms.CheckOutActual = CheckOut;
int updateType = -1;
if (aBookingRooms.Type == 2)
{
updateType = 2;
}
else if (aBookingRooms.Type == 0)
{
updateType = 0;
}
else if (aBookingRooms.Type == 3)
{
updateType = 2;
}
else if (aBookingRooms.Type == 1)
{
updateType = 0;
}
else
{
updateType = 3;
}
aBookingRooms.Type = updateType;
aBookingRooms.Status = 7;//da checkout nhung chua thanh toan
aBookingRooms.TimeInUse = decimal.Parse(aReceptionTaskBO.GetTimeInUsed(aBookingRooms.CheckInActual, CheckOut).ToString());
aBookingRooms.AddTimeStart = aReceptionTaskBO.GetAddTimeStart(aBookingRooms.Type.GetValueOrDefault(0), aBookingRooms.CheckInActual);
aBookingRooms.AddTimeEnd = aReceptionTaskBO.GetAddTimeEnd(aBookingRooms.Type.GetValueOrDefault(0), CheckOut);
return aBookingRoomsBO.Update(aBookingRooms);
}
else
{
return 0;
}
}
catch (Exception ex)
{
return 0;
}
}
示例8: CheckOut
public int CheckOut(int IDBookingRoom, DateTime CheckOut)
{
try
{
ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
BookingRoomsBO aBookingRoomsBO = new BookingRoomsBO();
BookingRooms aBookingRooms = aBookingRoomsBO.Select_ByID(IDBookingRoom);
if (aBookingRooms != null)
{
aBookingRooms.CheckOutActual = CheckOut;
aBookingRooms.Status = 7;//da checkout nhung chua thanh toan
aBookingRooms.TimeInUse = decimal.Parse(aReceptionTaskBO.GetTimeInUsed(aBookingRooms.CheckInActual, CheckOut).ToString());
aBookingRooms.AddTimeStart = aReceptionTaskBO.GetAddTimeStart(aBookingRooms.Type.GetValueOrDefault(0), aBookingRooms.CheckInActual);
aBookingRooms.AddTimeEnd = aReceptionTaskBO.GetAddTimeEnd(aBookingRooms.Type.GetValueOrDefault(0), CheckOut);
return aBookingRoomsBO.Update(aBookingRooms);
}
else
{
return 0;
}
}
catch (Exception ex)
{
return 0;
}
}