public void departmentStockInSearchView_SearchDepartmentStockInEvent(object sender, DepartmentStockInSearchEventArgs e) { var criteria = new ObjectCriteria(); criteria.AddEqCriteria("DepartmentStockInPK.DepartmentId", CurrentDepartment.Get().DepartmentId); criteria.AddGreaterOrEqualsCriteria("StockInDate", e.StockInDateFrom); criteria.AddLesserOrEqualsCriteria("StockInDate", e.StockInDateTo); criteria.AddLikeCriteria("DepartmentStockInPK.StockInId", e.StockInId + "%"); criteria.AddEqCriteria("DelFlg", (long)0); e.DepartmeneStockInList = DepartmentStockInLogic.FindAll(criteria); }
private void btnSearch_Click(object sender, EventArgs e) { var eventArgs = new DepartmentStockInSearchEventArgs { StockInId = txtBlockInDetailId.Text, StockInDateFrom = chkImportDateFrom.Checked ? DateUtility.ZeroTime(dtpImportDateFrom.Value) : DateTime.MinValue, StockInDateTo = chkImportDateTo.Checked ? DateUtility.MaxTime(dtpImportDateTo.Value) : DateTime.MaxValue }; EventUtility.fireEvent(SearchDepartmentStockInEvent, this, eventArgs); DepartmentStockInList = eventArgs.DepartmeneStockInList; PopulateDataGrid(); }
void _departmentStockInSearchController_CompletedSearchDepartmentStockInEvent(object sender, DepartmentStockInSearchEventArgs e) { Enabled = true; DepartmentStockInList = e.DepartmeneStockInList; PopulateDataGrid(); }
private void btnSearch_Click(object sender, EventArgs e) { var eventArgs = new DepartmentStockInSearchEventArgs { StockInId = txtBlockInDetailId.Text, StockInDateFrom = chkImportDateFrom.Checked ? DateUtility.ZeroTime(dtpImportDateFrom.Value) : DateUtility.MaxTime(DateTime.Now.Subtract(new TimeSpan(3,0,0,0))), StockInDateTo = chkImportDateTo.Checked ? DateUtility.MaxTime(dtpImportDateTo.Value) : DateUtility.MaxTime(DateTime.Now) }; EventUtility.fireAsyncEvent(SearchDepartmentStockInEvent, this, eventArgs,new AsyncCallback(EndEvent)); Enabled = false; /*DepartmentStockInList = eventArgs.DepartmeneStockInList; PopulateDataGrid();*/ }