private void frmRooms_Load(object sender, EventArgs e) { roomTypeDataTable = roomTypeBUS.GetAllRoomType(); //Binding data lkRoomTypeName.Properties.DataSource = roomTypeDataTable; lkRoomTypeName.Properties.DisplayMember = "RoomTypeName"; lkRoomTypeName.Properties.ValueMember = "RoomTypeID"; // statusDataTable = statusBUS.GetAllStatus(); lkStatus.Properties.DataSource = statusDataTable; lkStatus.Properties.DisplayMember = "StatusName"; lkStatus.Properties.ValueMember = "StatusID"; // roomDataTable = roomBUS.GetAllRoomWithDate(); grdListRooms.DataSource = roomDataTable; // -------------------------- search -------------------------- -------------- // tag range //search engine init _GridFilter = new GridFilter(grdvListRooms); _GridFilter.AddTextbox("RoomID", txtRoomId); _GridFilter.AddTextbox("RoomName", txtRoomName); _GridFilter.AddTextbox("RoomTypeID", lkRoomTypeName, true, false); _GridFilter.AddTextbox("StatusID", lkStatus, true, false); _GridFilter.AddTextbox("NumberOfBeds", txtNumberOfBeds, true, false); _GridFilter.AddDateControl("StartDate", dateFrom, true, false); _GridFilter.AddDateControl("EndDate", dateTo, true, false); dateFrom.DateTime = DateTime.Now; dateTo.DateTime = DateTime.Now; InitForSeachForm init = new InitForSeachForm(); init.Init(this, _GridFilter, txtSearchDelay, rgrSearAfter); init.SearchWhenTextChanged(lkRoomTypeName); init.SearchWhenTextChanged(dateFrom); init.SearchWhenTextChanged(dateTo); init.SearchWhenTextChanged(lkStatus); init.SearchWhenTextChanged(txtNumberOfBeds); init.SearchWhenTextChanged(txtRoomName); // assign }
private void frmRoom_Load(object sender, EventArgs e) { // roomTypeDataTable = roomTypeBUS.GetAllRoomType(); lkRoomType.Properties.DataSource = roomTypeDataTable; lkRoomType.Properties.DisplayMember = "RoomTypeName"; lkRoomType.Properties.ValueMember = "RoomTypeID"; // statusDataTable = statusBUS.GetAllStatus(); lkStatus.Properties.DataSource = statusDataTable; lkStatus.Properties.DisplayMember = "StatusName"; lkStatus.Properties.ValueMember = "StatusID"; // roomDataTable = roomBUS.GetAllRoom(); grdListRoom.DataSource = roomDataTable; InitControlByData(); }
private void frmStatus_Load(object sender, EventArgs e) { statusDataTable = statusBUS.GetAllStatus(); grdListStatus.DataSource = statusDataTable; InitControlByData(); }