private JlNavigatorTDS SubmitSearchForViews()
        {
            string sqlCommand = "";
            int viewId = Int32.Parse(ddlView.SelectedValue.Trim());

            JlNavigator jlNavigator = new JlNavigator();
            string workType = "Junction Lining Lateral";
            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
            jlNavigator.LoadForViewsProjectIdCompanyIdWorkType(sqlCommand, currentProjectId, companyId, workType);

            return (JlNavigatorTDS)jlNavigator.Data;
        }
        private MrNavigatorTDS SubmitSearchForViews()
        {
            string sqlCommand = "";
            int viewId = Int32.Parse(ddlView.SelectedValue.Trim());

            MrNavigator mrNavigator = new MrNavigator();
            string workType = hdfWorkType.Value.Trim();
            int companyId = Int32.Parse(hdfCompanyId.Value.Trim());
            int currentProjectId = Int32.Parse(hdfCurrentProjectId.Value.Trim());
            bool inProject = bool.Parse(hdfInProject.Value);

            // ... Load SqlCommand
            WorkViewGateway workViewGateway = new WorkViewGateway();
            workViewGateway.LoadByViewId(viewId, companyId);

            sqlCommand = workViewGateway.GetSqlCommand(viewId);

            // ... Load data
            mrNavigator.LoadForViewsProjectIdCompanyIdWorkType(sqlCommand, currentProjectId, companyId, workType, inProject);

            return (MrNavigatorTDS)mrNavigator.Data;
        }
Beispiel #3
0
        /// <summary>
        /// SaveForEdit
        /// </summary>
        /// <param name="viewId">viewId</param>
        /// <param name="loginId">loginId</param>
        /// <param name="name">name</param>
        /// <param name="type">type</param>
        /// <param name="logic">logic</param>
        /// <param name="sqlCommand">sqlCommand</param>
        /// <param name="workType">workType</param>
        /// <param name="companyId">companyId</param>
        public void SaveForEdit(int viewId, int loginId, string name, string type, string logic, string sqlCommand, string workType, int companyId, string newName, string newType)
        {
            WorkViewGateway workViewGateway = new WorkViewGateway();
            workViewGateway.LoadByViewId(viewId, companyId);

            int originalViewId = viewId;
            int originalLoginId = workViewGateway.GetLoginId(viewId);
            string originalName = workViewGateway.GetName(viewId);
            string originalType = workViewGateway.GetType(viewId);
            string originalLogic = workViewGateway.GetLogic(viewId);
            string originalSqlCommand = workViewGateway.GetSqlCommand(viewId);
            string originalWorkType = workViewGateway.GetWorkType(viewId);
            bool originalDeleted = workViewGateway.GetDeleted(viewId);
            int originalCompanyId = workViewGateway.GetCompanyId(viewId);

            UpdateDirect(originalViewId, originalLoginId, originalName, originalType, originalLogic, originalSqlCommand, originalWorkType, originalDeleted, originalCompanyId, viewId, loginId, newName, newType, logic, sqlCommand, workType, false, companyId);
        }