private PrNavigatorTDS SubmitSearch() { // Retrieve clauses string whereClause = GetWhereClause(); string orderByClause = GetOrderByClause(); string workType = hdfWorkType.Value.Trim(); string conditionValue1 = ""; string conditionValue2 = ""; string name = ""; int companyId = Int32.Parse(hdfCompanyId.Value.Trim()); int currentProjectId = Int32.Parse(hdfCurrentProjectId.Value.Trim()); // ... Load data for condition 1 WorkTypeViewConditionGateway workTypeViewConditionGateway = new WorkTypeViewConditionGateway(); workTypeViewConditionGateway.LoadByWorkTypeConditionId(workType, int.Parse(ddlCondition1.SelectedValue), companyId); name = workTypeViewConditionGateway.GetName(workType, companyId, int.Parse(ddlCondition1.SelectedValue)); conditionValue1 = workTypeViewConditionGateway.GetColumn_(workType, companyId, int.Parse(ddlCondition1.SelectedValue)); // ... If condition 2 exists if (ddlCondition2.SelectedValue != "-1") { // ... Load data for condition 2 WorkTypeViewConditionGateway workTypeViewConditionGateway2 = new WorkTypeViewConditionGateway(); workTypeViewConditionGateway2.LoadByWorkTypeConditionId(workType, int.Parse(ddlCondition2.SelectedValue), companyId); conditionValue2 = workTypeViewConditionGateway2.GetColumn_(workType, companyId, int.Parse(ddlCondition2.SelectedValue)); } // ... Load data PrNavigator prNavigator = new PrNavigator(); prNavigator.Load(whereClause, orderByClause, conditionValue1, tbxCondition1.Text.Trim(), conditionValue2, tbxCondition2.Text.Trim(), companyId, currentProjectId, workType, name); return (PrNavigatorTDS)prNavigator.Data; }
private PrNavigatorTDS SubmitSearchForViews() { string sqlCommand = ""; int viewId = Int32.Parse(ddlView.SelectedValue.Trim()); PrNavigator prNavigator = new PrNavigator(); string workType = hdfWorkType.Value.Trim(); int companyId = Int32.Parse(hdfCompanyId.Value.Trim()); int currentProjectId = Int32.Parse(hdfCurrentProjectId.Value.Trim()); // ... Load SqlCommand WorkViewGateway workViewGateway = new WorkViewGateway(); workViewGateway.LoadByViewId(viewId, companyId); sqlCommand = workViewGateway.GetSqlCommand(viewId); // ... Load data prNavigator.LoadForViewsProjectIdCompanyIdWorkType(sqlCommand, currentProjectId, companyId, workType); return (PrNavigatorTDS)prNavigator.Data; }
private void PostPageChanges() { PrNavigator prNavigator = new PrNavigator(prNavigatorTDS); // Update jlinernavigator rows foreach (GridViewRow row in grdPrNavigator.Rows) { string assetId_ = ((Label)row.FindControl("lblAssetId_")).Text.Trim(); bool selected = ((CheckBox)row.FindControl("cbxSelected")).Checked; prNavigator.Update(assetId_, selected); } prNavigator.Data.AcceptChanges(); // Store datasets Session["prNavigatorTDS"] = prNavigatorTDS; }