当前位置: 首页>>代码示例>>C#>>正文


C# ReceptionTaskBO.SetDateValueDefault方法代码示例

本文整理汇总了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);
            }
        }
开发者ID:BruceleeThanh,项目名称:Pro_Government_0207,代码行数:42,代码来源:frmTsk_CheckIn_Group_Step1.cs

示例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);
            }
        }
开发者ID:BruceleeThanh,项目名称:Pro_Government_0207,代码行数:54,代码来源:frmTsk_BookingForRoom.cs

示例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);
            }
        }
开发者ID:BruceleeThanh,项目名称:Pro_Government_2307,代码行数:73,代码来源:frmTsk_CheckIn.cs

示例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);
            }
        }
开发者ID:BruceleeThanh,项目名称:Pro_Government_2307,代码行数:36,代码来源:frmTsk_Booking_Step1.cs


注:本文中的BussinessLogic.ReceptionTaskBO.SetDateValueDefault方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。