本文整理汇总了C#中BussinessLogic.ReceptionTaskBO.SetDateValueDefault方法的典型用法代码示例。如果您正苦于以下问题:C# ReceptionTaskBO.SetDateValueDefault方法的具体用法?C# ReceptionTaskBO.SetDateValueDefault怎么用?C# ReceptionTaskBO.SetDateValueDefault使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BussinessLogic.ReceptionTaskBO
的用法示例。
在下文中一共展示了ReceptionTaskBO.SetDateValueDefault方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: frmTsk_CheckIn_Group_Step1_Load
private void frmTsk_CheckIn_Group_Step1_Load(object sender, EventArgs e)
{
try
{
ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
if (String.IsNullOrEmpty(this.codeRoom) == false)
{
dtpFrom.DateTime = DateTime.Now;
dtpTo.DateTime = aReceptionTaskBO.SetDateValueDefault(DateTime.Now.AddDays(1));
this.LoadListAvailableRooms(dtpFrom.DateTime, dtpTo.DateTime);
List<RoomsEN> aListRoomEN = this.aListAvaiableRooms.Where(p => p.Code == this.codeRoom).ToList();
if (aListRoomEN.Count > 0)
{
this.aListAvaiableRooms.Remove(aListRoomEN[0]);
dgvAvailableRooms.DataSource = this.aListAvaiableRooms;
dgvAvailableRooms.RefreshDataSource();
RoomMemberEN aRoomMemberEN = new RoomMemberEN();
aRoomMemberEN.RoomSku = aListRoomEN[0].Sku;
aRoomMemberEN.RoomCode = aListRoomEN[0].Code;
aRoomMemberEN.RoomTypeDisplay = aListRoomEN[0].TypeDisplay;
aRoomMemberEN.RoomBed1 = aListRoomEN[0].Bed1.GetValueOrDefault();
aRoomMemberEN.RoomBed2 = aListRoomEN[0].Bed2.GetValueOrDefault();
aRoomMemberEN.RoomCostRef = aListRoomEN[0].CostRef.GetValueOrDefault();
this.aCheckInEN.aListRoomMembers.Insert(this.aCheckInEN.aListRoomMembers.Count, aRoomMemberEN);
dgvSelectedRooms.DataSource = this.aCheckInEN.aListRoomMembers;
dgvSelectedRooms.RefreshDataSource();
}
}
else
{
dtpFrom.DateTime = DateTime.Now;
dtpTo.DateTime = aReceptionTaskBO.SetDateValueDefault(DateTime.Now.AddDays(1));
this.LoadListAvailableRooms(dtpFrom.DateTime, dtpTo.DateTime);
}
}
catch (Exception ex)
{
MessageBox.Show("frmTsk_CheckIn_Group_Step1.frmTsk_CheckIn_Group_Step1_Load\n" + ex.ToString(), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
示例2: frmTsk_BookingForRoom_Load
//Hiennv tạo mới 25/11/2014
private void frmTsk_BookingForRoom_Load(object sender, EventArgs e)
{
try
{
if (this.customerType == 1)
{
chkCustomerType.Visible = true;
txtNameCompany.Visible = true;
}
else if (this.customerType == 2)
{
chkCustomerType.Visible = false;
txtNameCompany.Visible = true;
}
else
{
chkCustomerType.Visible = false;
txtNameCompany.Visible = false;
}
ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
dtpFrom.DateTime = DateTime.Now;
dtpTo.DateTime = aReceptionTaskBO.SetDateValueDefault(DateTime.Now.AddDays(1));
dgvAvailableRooms.DataSource = this.LoadListAvailableRooms(dtpFrom.DateTime, dtpTo.DateTime);
dgvAvailableRooms.RefreshDataSource();
dgvSelectedRooms.DataSource = this.LoadListSelectRooms(dtpFrom.DateTime, dtpTo.DateTime);
dgvSelectedRooms.RefreshDataSource();
lueIDCompanies.Properties.DataSource = this.LoadListCompaniesByType(this.customerType);
lueIDCompanies.Properties.ValueMember = "ID";
lueIDCompanies.Properties.DisplayMember = "Name";
if (this.customerType == 3) // khach le
{
if (this.LoadListCompaniesByType(this.customerType).Count > 0)
{
lueIDCompanies.EditValue = this.LoadListCompaniesByType(this.customerType)[0].ID;
}
}
lueIDCustomer.Properties.DataSource = this.LoadAllListCustomers();
lueIDCustomer.Properties.ValueMember = "ID";
lueIDCustomer.Properties.DisplayMember = "Name";
}
catch (Exception ex)
{
MessageBox.Show("frmTsk_BookingForRoom.frmTsk_BookingForRoom_Group_Step1_Load\n" + ex.ToString(), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
示例3: frmTsk_CheckIn_Load
//Hiennv tạo mới 18/11/2014
private void frmTsk_CheckIn_Load(object sender, EventArgs e)
{
try
{
if (this.customerType == 1)
{
chkCustomerType.Visible = true;
txtNameCompany.Visible = true;
}
else if (this.customerType == 2)
{
chkCustomerType.Visible = false;
txtNameCompany.Visible = true;
}
else
{
chkCustomerType.Visible = false;
txtNameCompany.Visible = false;
}
ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
dtpFrom.DateTime = DateTime.Now;
dtpTo.DateTime = aReceptionTaskBO.SetDateValueDefault(DateTime.Now.AddDays(1));
dgvAvailableRooms.DataSource = this.LoadListAvailableRooms(dtpFrom.DateTime, dtpTo.DateTime);
dgvAvailableRooms.RefreshDataSource();
dgvSelectedRooms.DataSource = this.LoadListSelectRooms(dtpFrom.DateTime, dtpTo.DateTime);
dgvSelectedRooms.RefreshDataSource();
this.LoadAllListCustomers();
lueIDCompanies.Properties.DataSource = this.LoadListCompaniesByType(this.customerType);
lueIDCompanies.Properties.ValueMember = "ID";
lueIDCompanies.Properties.DisplayMember = "Name";
if (this.customerType == 3) // khach le
{
if (this.LoadListCompaniesByType(this.customerType).Count > 0)
{
lueIDCompanies.EditValue = this.LoadListCompaniesByType(this.customerType)[0].ID;
}
}
lueGender.Properties.DataSource = CORE.CONSTANTS.ListGenders;//Load Gioi tinh
lueGender.Properties.DisplayMember = "Name";
lueGender.Properties.ValueMember = "ID";
lueGender.EditValue = CORE.CONSTANTS.SelectedGender(1).ID;
lueNationality.Properties.DataSource = CORE.CONSTANTS.ListCountries;//Load Country
lueNationality.Properties.DisplayMember = "Name";
lueNationality.Properties.ValueMember = "Code";
lueNationality.EditValue = CORE.CONSTANTS.SelectedCountry(704).Code;
lueCitizen.Properties.DataSource = CORE.CONSTANTS.ListCitizens;//Load Citizen
lueCitizen.Properties.DisplayMember = "Name";
lueCitizen.Properties.ValueMember = "ID";
lueCitizen.EditValue = CORE.CONSTANTS.SelectedCitizen(2).ID;
if (!String.IsNullOrEmpty(this.aCurrent_CodeRoom))
{
RoomsBO aRoomsBO = new RoomsBO();
lblRoomSku.Text = "Phòng số :" + aRoomsBO.Select_ByCodeRoom(this.aCurrent_CodeRoom, 1).Sku;
}
}
catch (Exception ex)
{
MessageBox.Show("frmTsk_CheckIn.frmTsk_CheckIn_Group_Step1_Load\n" + ex.ToString(), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
示例4: frmTsk_Booking_Step1_Load
private void frmTsk_Booking_Step1_Load(object sender, EventArgs e)
{
try
{
ReceptionTaskBO aReceptionTaskBO = new ReceptionTaskBO();
if (String.IsNullOrEmpty(this.codeRoom) == false)
{
dtpFrom.DateTime = DateTime.Now;
dtpTo.DateTime = aReceptionTaskBO.SetDateValueDefault(DateTime.Now.AddDays(30));
this.LoadListAvailableRooms(dtpFrom.DateTime, dtpTo.DateTime);
List<RoomsEN> aListRoomEN = aListAvaiableRooms.Where(p => p.Code == this.codeRoom).ToList();
if (aListRoomEN.Count > 0)
{
this.aListAvaiableRooms.Remove(aListRoomEN[0]);
dgvAvailableRooms.DataSource = this.aListAvaiableRooms;
dgvAvailableRooms.RefreshDataSource();
this.aBookingEN.aListRoomsEN.Insert(this.aBookingEN.aListRoomsEN.Count, aListRoomEN[0]);
dgvSelectedRooms.DataSource = this.aBookingEN.aListRoomsEN;
dgvSelectedRooms.RefreshDataSource();
}
}
else
{
dtpFrom.DateTime = DateTime.Now;
dtpTo.DateTime = aReceptionTaskBO.SetDateValueDefault(DateTime.Now.AddDays(30));
this.LoadListAvailableRooms(dtpFrom.DateTime, dtpTo.DateTime);
}
}
catch (Exception ex)
{
MessageBox.Show("frmTsk_Booking_Step1.frmTsk_Booking_Step1_Load\n" + ex.ToString(), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}