private SupportTicketNavigatorTDS SubmitSearch()
        {
            // Retrieve clauses
            string whereClause = GetWhereClause();
            string orderByClause = GetOrderByClause();
            string conditionValue = "";
            string conditionName = "";

            SupportTicketNavigator supportTicketNavigator = new SupportTicketNavigator();
            string fmType = hdfFmType.Value.Trim();
            int companyId = Int32.Parse(hdfCompanyId.Value.Trim());

            // ... Load data
            FmTypeViewConditionGateway fmTypeViewConditionGateway = new FmTypeViewConditionGateway();
            fmTypeViewConditionGateway.LoadByFmTypeConditionId(fmType, companyId, int.Parse(ddlCondition1.SelectedValue));

            conditionValue = fmTypeViewConditionGateway.GetColumn_(fmType, companyId, int.Parse(ddlCondition1.SelectedValue));
            conditionName = fmTypeViewConditionGateway.GetName(fmType, companyId, int.Parse(ddlCondition1.SelectedValue));

            supportTicketNavigator.Load(whereClause, orderByClause, conditionValue, conditionName, tbxCondition1.Text.Trim(), companyId);

            return (SupportTicketNavigatorTDS)supportTicketNavigator.Data;
        }
        private void PostPageChanges()
        {
            SupportTicketNavigator supportTicketNavigator = new SupportTicketNavigator(supportTicketNavigatorTDS);

            // Update supportTicketNavigator rows
            foreach (GridViewRow row in grdSupportTicketNavigator.Rows)
            {
                string supportTicketIdLabel = ((Label)row.FindControl("lblSupportTicketId")).Text.Trim();
                int supportTicketId = Int32.Parse(supportTicketIdLabel.ToString().Trim());
                bool selected = ((CheckBox)row.FindControl("cbxSelected")).Checked;

                supportTicketNavigator.Update(supportTicketId, selected);
            }

            supportTicketNavigator.Data.AcceptChanges();

            // Store datasets
            Session["supportTicketNavigatorTDS"] = supportTicketNavigatorTDS;
        }