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

            RevenueNavigatorTDS dataSet = new RevenueNavigatorTDS();
            RevenueNavigatorGateway revenueNavigatorGateway = new RevenueNavigatorGateway(dataSet);

            //... Load data
            RevenueNavigator revenueNavigator = new RevenueNavigator(dataSet);
            revenueNavigator.Load(whereClause, orderByClause);

            return dataSet;
        }
コード例 #2
0
        private void PostPageChanges()
        {
            RevenueNavigator revenueNavigator = new RevenueNavigator(revenueNavigatorTDS);

            // Update
            foreach (GridViewRow row in grdNavigator.Rows)
            {
                int projectId = Int32.Parse(((Label)row.FindControl("lblProjectId")).Text.Trim());
                int refId = Int32.Parse(((Label)row.FindControl("lblRefId")).Text.Trim());
                bool selected = ((CheckBox)row.FindControl("cbxSelected")).Checked;

                revenueNavigator.Update(projectId, refId, selected);
                hdfCurrentProjectId.Value = projectId.ToString();
                hdfCurrentRefId.Value = refId.ToString();
            }

            revenueNavigator.Data.AcceptChanges();

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