Beispiel #1
0
        private void frmCustomer_Load(object sender, EventArgs e)
        {
            customerDataTable          = customerBUS.GetAllCustomer();
            grdListCustomer.DataSource = customerDataTable;
            //
            minAge = Int32.Parse(ruleBUS.GetRuleByLabel("DoTuoiNhanVienToiThieu"));
            maxAge = Int32.Parse(ruleBUS.GetRuleByLabel("DoTuoiNhanVienToiDa"));

            LoadSerach();
        }
 private void frmOrderSearch_Load(object sender, EventArgs e)
 {
     customerDataTable = customerBUS.GetAllCustomer();
     lkCustomer.Properties.DataSource    = customerDataTable;
     lkCustomer.Properties.DisplayMember = "CustomerName";
     lkCustomer.Properties.ValueMember   = "CustomerID";
 }
Beispiel #3
0
        private void frmOrder_Load(object sender, EventArgs e)
        {
            OrderOfDate.EditValue = DateTime.Now;
            dateStart.EditValue   = DateTime.Now;
            dateEnd.EditValue     = DateTime.Now;
            //
            //roomTypeDataTable = roomTypeBUS.GetAllRoomType();
            //lkRoomType.Properties.DataSource = roomTypeDataTable;
            //lkRoomType.Properties.DisplayMember = "RoomTypeName";
            //lkRoomType.Properties.ValueMember = "RoomTypeID";
            //
            roomTypeDataTable = roomTypeBUS.GetAllRoomType();
            chkCmbRoomTypeName.Properties.DataSource    = roomTypeDataTable;
            chkCmbRoomTypeName.Properties.DisplayMember = "RoomTypeName";
            chkCmbRoomTypeName.Properties.ValueMember   = "RoomTypeID";
            chkCmbRoomTypeName.CheckAll();
            //
            customerDataTable = customerBUS.GetAllCustomer();
            lkCustomer.Properties.DataSource    = customerDataTable;
            lkCustomer.Properties.DisplayMember = "CustomerName";
            lkCustomer.Properties.ValueMember   = "CustomerID";

            //
            grdColRomSno.VisibleIndex      = 1;
            roomResultDataTable            = roomBUS.GetAllRoomByDateFromTo(dateStart.DateTime, dateEnd.DateTime);
            roomResultDataTableClone       = roomResultDataTable.Clone();
            roomMulitiSelect               = new GridCheckMarksSelection(grdvSearchRoomResult);
            grdSearchRoomResult.DataSource = roomResultDataTableClone;
            //
            grdCol1RoomSno.VisibleIndex = 1;
            roomSelectsMulitiSelect     = new GridCheckMarksSelection(grdvListRoom);
            roomSelectsDataTable        = new DataTable();
            makeDataTable(new string[] { "RoomID", "RoomName", "RoomTypeName", "StartDate", "EndDate", "NumberOfBeds", "Price", "Monetized", "StatusName" }, ref roomSelectsDataTable);
            grdListRoom.DataSource = roomSelectsDataTable;
            //grdListRoom.DataSource = roomResultDataTable;
            //
            grdvListRoom.OptionsSelection.EnableAppearanceFocusedRow           = false;
            grdvListRoom.Columns["CheckMarkSelection"].OptionsColumn.AllowEdit = true;
        }
Beispiel #4
0
        private void frmCustomer_Load(object sender, EventArgs e)
        {
            customerDataTable          = customerBUS.GetAllCustomer();
            grdListCustomer.DataSource = customerDataTable;
            //
            minAge = Int32.Parse(ruleBUS.GetRuleByLabel("DoTuoiNhanVienToiThieu"));
            maxAge = Int32.Parse(ruleBUS.GetRuleByLabel("DoTuoiNhanVienToiDa"));


            // -------------------------- search -------------------------- --------------

            // tag
            dateBirthDay.Tag = dateBirthDayMax;

            //search engine init
            _GridFilter = new GridFilter(grdvListCustomer);
            _GridFilter.AddTextbox("CustomerID", txtCustomerId);
            _GridFilter.AddTextbox("CustomerName", txtCustomerName);
            _GridFilter.AddTextbox("Gender", cmbCustomerGender, false);
            _GridFilter.AddDateControl("DateOfBirth", dateBirthDay);
            _GridFilter.AddTextbox("Address", txtCustomerAddress);
            _GridFilter.AddTextbox("PhoneNumber", txtCustomerPhone);
            _GridFilter.AddTextbox("Email", txtCustomerEmail);
            _GridFilter.AddTextbox("IDNumber", txtCMND);

            // assign
            dateBirthDayMax.DateTime = DateTime.Now.AddYears(-15);
            dateBirthDay.DateTime    = dateBirthDayMax.DateTime.AddYears(-50);

            //event
            InitForSeachForm init = new InitForSeachForm();

            init.Init(this, _GridFilter, txtSearchDelay, rgrSearAfter);
            init.SearchWhenTextChanged(dateBirthDay);
            init.SearchWhenTextChanged(dateBirthDayMax);
            init.SearchWhenTextChanged(cmbCustomerGender);
        }