/// <summary>
        /// SaveForEdit
        /// </summary>
        public void SaveForEdit()
        {
            foreach (WorkViewTDS.WorkViewDisplayTempRow rowViewDisplay in (WorkViewTDS.WorkViewDisplayTempDataTable)Data.Tables["WorkViewDisplayTemp"])
            {
                WorkViewDisplay workViewDisplay = new WorkViewDisplay(null);

                if (!rowViewDisplay.Deleted && !rowViewDisplay.InDatabase && rowViewDisplay.Selected)
                {
                    workViewDisplay.InsertDirect(rowViewDisplay.ViewID, rowViewDisplay.WorkType, rowViewDisplay.COMPANY_ID, rowViewDisplay.DisplayID, rowViewDisplay.Deleted);
                }

                if (!rowViewDisplay.Deleted && rowViewDisplay.InDatabase && rowViewDisplay.Selected)
                {
                    WorkViewDisplayGateway workViewDisplayGateway = new WorkViewDisplayGateway();
                    workViewDisplayGateway.LoadAllByViewIdWorkTypeDisplayId(rowViewDisplay.ViewID, rowViewDisplay.WorkType, rowViewDisplay.COMPANY_ID, rowViewDisplay.DisplayID);

                    int originalViewId = rowViewDisplay.ViewID;
                    string originalWorkType = rowViewDisplay.WorkType;
                    int originalCompanyId = rowViewDisplay.COMPANY_ID;
                    int originalDisplayId = rowViewDisplay.DisplayID;
                    bool originalDeleted = workViewDisplayGateway.GetDeleted(rowViewDisplay.ViewID, rowViewDisplay.WorkType, rowViewDisplay.COMPANY_ID, rowViewDisplay.DisplayID);

                    workViewDisplay.UpdateDirect(originalViewId, originalWorkType, originalCompanyId, originalDisplayId, originalDeleted, rowViewDisplay.ViewID, rowViewDisplay.WorkType, rowViewDisplay.COMPANY_ID, rowViewDisplay.DisplayID, rowViewDisplay.Deleted);

                }

                if (rowViewDisplay.Deleted && rowViewDisplay.InDatabase && !rowViewDisplay.Selected)
                {
                    workViewDisplay.DeleteDirectForEditView(rowViewDisplay.ViewID, rowViewDisplay.WorkType, rowViewDisplay.COMPANY_ID, rowViewDisplay.DisplayID);
                }

            }
        }
        /// <summary>
        /// Save
        /// </summary>
        public void Save()
        {
            foreach (WorkViewTDS.WorkViewDisplayTempRow rowViewDisplay in (WorkViewTDS.WorkViewDisplayTempDataTable)Data.Tables["WorkViewDisplayTemp"])
            {
                if (!rowViewDisplay.Deleted)
                {
                    int displayId = rowViewDisplay.DisplayID;

                    WorkViewDisplay workViewDisplay = new WorkViewDisplay(null);
                    workViewDisplay.InsertDirect(rowViewDisplay.ViewID, rowViewDisplay.WorkType, rowViewDisplay.COMPANY_ID, rowViewDisplay.DisplayID, rowViewDisplay.Deleted);
                }
            }
        }