/// <summary> /// LoadAllByViewIdFmTypeSortId /// </summary> /// <param name="viewId">viewId</param> /// <param name="fmType">fmType</param> /// <param name="companyId">companyId</param> /// <param name="sortId">sortId</param> public void LoadAllByViewIdFmTypeSortId(int viewId, string fmType, int companyId, int sortId) { FmViewSortGateway fmViewSortGateway = new FmViewSortGateway(Data); fmViewSortGateway.LoadAllByViewIdFmTypeSortId(viewId, fmType, companyId, sortId); }
/// <summary> /// SaveForEdit /// </summary> public void SaveForEdit() { foreach (FmViewTDS.FmViewSortTempRow rowViewSort in (FmViewTDS.FmViewSortTempDataTable)Data.Tables["FmViewSortTemp"]) { FmViewSort fmViewSort = new FmViewSort(null); if (!rowViewSort.Deleted && !rowViewSort.InDatabase && rowViewSort.Selected) { fmViewSort.InsertDirect(rowViewSort.ViewID, rowViewSort.FmType, rowViewSort.COMPANY_ID, rowViewSort.SortID, rowViewSort.Order_, rowViewSort.Deleted); } if (!rowViewSort.Deleted && rowViewSort.InDatabase && rowViewSort.Selected) { FmViewSortGateway fmViewSortGateway = new FmViewSortGateway(); fmViewSortGateway.LoadAllByViewIdFmTypeSortId(rowViewSort.ViewID, rowViewSort.FmType, rowViewSort.COMPANY_ID, rowViewSort.SortID); int originalViewId = rowViewSort.ViewID; string originalFmType = rowViewSort.FmType; int originalCompanyId = rowViewSort.COMPANY_ID; int originalSortId = rowViewSort.SortID; int originalOrder = fmViewSortGateway.GetOrder(rowViewSort.ViewID, rowViewSort.FmType, rowViewSort.COMPANY_ID, rowViewSort.SortID); bool originalDeleted = fmViewSortGateway.GetDeleted(rowViewSort.ViewID, rowViewSort.FmType, rowViewSort.COMPANY_ID, rowViewSort.SortID); fmViewSort.UpdateDirect(originalViewId, originalFmType, originalCompanyId, originalSortId, originalOrder, originalDeleted, rowViewSort.ViewID, rowViewSort.FmType, rowViewSort.COMPANY_ID, rowViewSort.SortID, rowViewSort.Order_, rowViewSort.Deleted); } if (rowViewSort.Deleted && rowViewSort.InDatabase && !rowViewSort.Selected) { fmViewSort.DeleteDirectForEditView(rowViewSort.ViewID, rowViewSort.FmType, rowViewSort.COMPANY_ID, rowViewSort.SortID); } } }