コード例 #1
0
        private ServicesNavigatorTDS SubmitSearch()
        {
            // Retrieve clauses
            string whereClause = GetWhereClause();
            string orderByClause = GetOrderByClause();
            string conditionValue = "";

            ServicesNavigator servicesNavigator = new ServicesNavigator();
            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));

            servicesNavigator.Load(whereClause, orderByClause, conditionValue, tbxCondition1.Text.Trim(), companyId, fmType);

            return (ServicesNavigatorTDS)servicesNavigator.Data;
        }
コード例 #2
0
        private ServicesNavigatorTDS SubmitSearchForViews()
        {
            int viewId = Int32.Parse(ddlView.SelectedValue.Trim());
            int companyId = Int32.Parse(hdfCompanyId.Value.Trim());

            // ... Load SqlCommand
            FmViewGateway fmViewGateway = new FmViewGateway();
            fmViewGateway.LoadByViewId(viewId, companyId);

            string sqlCommand = "";
            sqlCommand = fmViewGateway.GetSqlCommand(viewId);

            // ... Load data
            string fmType = hdfFmType.Value.Trim();

            ServicesNavigator servicesNavigator = new ServicesNavigator();
            servicesNavigator.LoadForViewsFmTypeCompanyId(sqlCommand, fmType, companyId);

            return (ServicesNavigatorTDS)servicesNavigator.Data;
        }
コード例 #3
0
        private void PostPageChanges()
        {
            ServicesNavigator servicesNavigator = new ServicesNavigator(servicesNavigatorTDS);

            // Update serviceNavigator rows
            foreach (GridViewRow row in grdServicesNavigator.Rows)
            {
                string serviceIdLabel = ((Label)row.FindControl("lblServiceId")).Text.Trim();
                int serviceId = Int32.Parse(serviceIdLabel.ToString().Trim());
                bool selected = ((CheckBox)row.FindControl("cbxSelected")).Checked;

                servicesNavigator.Update(serviceId, selected);
            }

            servicesNavigator.Data.AcceptChanges();

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