Пример #1
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);
        }