public ILeaveRequestListView CreateLeaveRequestList(IList <ILeaveRequestModel> leaveRequestCollection, IEmployee employee, ICompanyDetail company, int employeeId, string processingMessage) { var ViewModel = new LeaveRequestListView { LeaveRequestCollection = leaveRequestCollection, employeeId = employeeId, ProcessingMessage = processingMessage, Employee = employee, Company = company }; return(ViewModel); }
private void barButtonItem24_ItemClick_1(object sender, ItemClickEventArgs e) { foreach (var mdiChild in this.MdiChildren) { if (mdiChild.GetType() == typeof(LeaveRequestListView)) { mdiChild.Activate(); return; } } var lrl = new LeaveRequestListView(); lrl.ShowList(); lrl.MdiParent = this; lrl.Show(); }
/// <summary> /// Creates the leave request ListView. /// </summary> /// <param name="leaveRequestCollection">The leave request collection.</param> /// <param name="listViewData">The list view data.</param> /// <returns></returns> public ILeaveRequestListView CreateLeaveRequestListView(IList <ILeaveRequestModel> leaveRequestCollection, IList <ILeaveStatus> leaveStatusCollection, string processingMessage) { // prepare the leaveStatus drop down and filter the list var filteredList = leaveRequestCollection; //Get drop down for Leave Status var leaveStatusDDL = GetDropDownList.LeaveStatusListItems(leaveStatusCollection, -1); // prepare the view model var viewModel = new LeaveRequestListView { LeaveRequestCollection = filteredList, LeaveStatusDropDown = leaveStatusDDL, ProcessingMessage = processingMessage }; return(viewModel); }