Compare commits
92
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a34828113a | ||
|
|
461329468c | ||
|
|
35de5df04d | ||
|
|
4f0548fd60 | ||
|
|
5c1d96cc51 | ||
|
|
57049c0c52 | ||
|
|
31326e1c91 | ||
|
|
3c60994a0a | ||
|
|
773cc42346 | ||
|
|
f46a1f39dc | ||
|
|
b7175bf77f | ||
|
|
ec22232aa8 | ||
|
|
f303cd2236 | ||
|
|
f40cef4416 | ||
|
|
fbca97d38d | ||
|
|
28bd2cba5c | ||
|
|
4b35f73bbf | ||
|
|
f4706eb126 | ||
|
|
21bcb90558 | ||
|
|
ae48ac0cae | ||
|
|
cb4979d5bc | ||
|
|
7d3ae74e1f | ||
|
|
9d680aa500 | ||
|
|
0d50b1c2fe | ||
|
|
75e034863f | ||
|
|
3b42de1571 | ||
|
|
668472286e | ||
|
|
e00d34c99d | ||
|
|
9fb496dfb3 | ||
|
|
f4eaa4a3ef | ||
|
|
5d50ed6bdf | ||
|
|
d7ace4eaf9 | ||
|
|
16a4d335ea | ||
|
|
ba69bb0772 | ||
|
|
455940caa2 | ||
|
|
439344757e | ||
|
|
ad912691c9 | ||
|
|
237144aff6 | ||
|
|
810332d558 | ||
|
|
f8431d0ba1 | ||
|
|
57c3bfa16a | ||
|
|
61f1077608 | ||
|
|
8877e968b9 | ||
|
|
4575c90bee | ||
|
|
21279a87ae | ||
|
|
3d5ad4a17e | ||
|
|
9bb7b044a8 | ||
|
|
dc8f2f7561 | ||
|
|
829dbf84da | ||
|
|
7b156c17f8 | ||
|
|
cbf7cbc164 | ||
|
|
b04faa816e | ||
|
|
517ebe2902 | ||
|
|
03d0d314e3 | ||
|
|
3e804c5cce | ||
|
|
ee2b8b538e | ||
|
|
fdfd34fe92 | ||
|
|
2d6fb6523b | ||
|
|
3084bf3982 | ||
|
|
5ba51e8392 | ||
|
|
fb5eb43e34 | ||
|
|
b154056276 | ||
|
|
c67b8f9ca1 | ||
|
|
95e4181360 | ||
|
|
32dffbe56b | ||
|
|
6b3c8d373b | ||
|
|
db29107f47 | ||
|
|
355537f2ab | ||
|
|
0729ef0c21 | ||
|
|
6fe82bfd0f | ||
|
|
39bf072363 | ||
|
|
da7c384fd8 | ||
|
|
95130fd9a0 | ||
|
|
978e2344a3 | ||
|
|
c9bf45602c | ||
|
|
aa160b2036 | ||
|
|
f82b32d351 | ||
|
|
e519dc9a57 | ||
|
|
f020c37db9 | ||
|
|
5a4ec3b6b1 | ||
|
|
2602d6c9d2 | ||
|
|
ff403583d7 | ||
|
|
c5577cc2bd | ||
|
|
78be6e5dc1 | ||
|
|
b954a41375 | ||
|
|
0100a11cfe | ||
|
|
04cf2e8534 | ||
|
|
be00724818 | ||
|
|
274d93c61a | ||
|
|
7dc4c30436 | ||
|
|
028ef4bc31 | ||
|
|
42124d65c7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -23,8 +23,8 @@ using System.Runtime.CompilerServices;
|
||||
// Build YYMM (two digit year, two digit month)
|
||||
// Revision DHH (day - no leading zero, two digit hour - military time
|
||||
//
|
||||
[assembly: AssemblyVersion("2.3.2410.815")]
|
||||
[assembly: AssemblyFileVersion("2.3.2410.815")]
|
||||
[assembly: AssemblyVersion("2.3.2404.1611")]
|
||||
[assembly: AssemblyFileVersion("2.3.2404.1611")]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
@@ -92,6 +92,5 @@ using System.Runtime.CompilerServices;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -100,7 +100,6 @@ using System.Text;
|
||||
using RODBInterface;
|
||||
using ROFields;
|
||||
using VlnStatus;
|
||||
using System.Linq;
|
||||
|
||||
namespace ROEditor
|
||||
{
|
||||
@@ -246,37 +245,6 @@ namespace ROEditor
|
||||
return CvtFldToUserFld(origGroup);
|
||||
}
|
||||
}
|
||||
|
||||
//CSM C2024-023
|
||||
//Part of 2024 PROMS Upgrades
|
||||
//When the Overall Form is activated
|
||||
//if there are any items that are Fields that are in use
|
||||
//add them as auto-complete options to the
|
||||
//Accessory Page Access - Value Textbox
|
||||
//Typing < will bring up the auto-complete options
|
||||
protected void tbValue_AddAutoComplete(object sender, EventArgs e)
|
||||
{
|
||||
string dummy = ""; // need for RODB_GetFIeldsInUse call, won't be used.
|
||||
ArrayList AvailList, InUseList;
|
||||
//first see if it is a valid 'InUse' Field.
|
||||
AvailList = myrodb.RODB_GetFields(elem, (uint)RecordType.Schema);
|
||||
InUseList = myrodb.RODB_GetFieldsInUse(elem, AvailList, "FieldsInUse", ref dummy, false);
|
||||
|
||||
//if any ROField items are in use,
|
||||
//use LINQ to get a string array of the FieldNames
|
||||
if (InUseList.Count > 0)
|
||||
{
|
||||
string[] InUseListFieldNames = InUseList.OfType<ROField>().Select(x => $"<{x.GetFieldname}>").ToArray();
|
||||
AutoCompleteStringCollection allowedTypes = new AutoCompleteStringCollection();
|
||||
allowedTypes.AddRange(InUseListFieldNames);
|
||||
tbValue.AutoCompleteCustomSource = allowedTypes;
|
||||
tbValue.AutoCompleteMode = AutoCompleteMode.Suggest;
|
||||
tbValue.AutoCompleteSource = AutoCompleteSource.CustomSource;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void FillInData()
|
||||
{
|
||||
this.tbGroup.Text = DetermineGroupName();
|
||||
@@ -464,7 +432,6 @@ namespace ROEditor
|
||||
this.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||
this.Name = "GroupDefFrm";
|
||||
this.Text = "Group Definition";
|
||||
this.Activated += new EventHandler(tbValue_AddAutoComplete);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
|
||||
@@ -23798,7 +23798,7 @@ BEGIN TRY -- Try Block
|
||||
--then remove the link from the copy
|
||||
--if original item was not linked, update new items to not be linked
|
||||
DECLARE @xconfig XML = (Select cast(config as xml) xconfig from Contents where ContentID = @ContentID);
|
||||
IF ISNULL(@xconfig.exist('//Enhanced[1]'),0) = 0
|
||||
IF @xconfig.exist('//Enhanced[1]') = 0
|
||||
BEGIN
|
||||
UPDATE Contents SET Config = dbo.vefn_RemoveEnhanced(Contents.Config)
|
||||
Where ContentID in (Select ContentID FROM vefn_ChildItems(@NewItemID))
|
||||
@@ -23904,135 +23904,6 @@ GO
|
||||
IF (@@Error = 0) PRINT 'Procedure Creation: [PasteItemReplace] Succeeded'
|
||||
ELSE PRINT 'Procedure Creation: [PasteItemReplace] Error on Creation'
|
||||
GO
|
||||
-- SP: AddDisplayTabState
|
||||
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[AddDisplayTabState]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||
DROP PROCEDURE [AddDisplayTabState];
|
||||
GO
|
||||
-- =============================================
|
||||
-- Author: Paul Larsen
|
||||
-- Create date: 9/18/2024
|
||||
-- Description: Save current open tab state in PROMS editor.
|
||||
-- =============================================
|
||||
CREATE PROCEDURE [dbo].[AddDisplayTabState]
|
||||
(
|
||||
@ItemID int,
|
||||
@DisplayTabID varchar(30),
|
||||
@DisplayTabName varchar(100),
|
||||
@userID varchar(100),
|
||||
@order int
|
||||
)
|
||||
|
||||
AS
|
||||
BEGIN
|
||||
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||
-- interfering with SELECT statements.
|
||||
SET NOCOUNT ON;
|
||||
|
||||
-- Remove all records
|
||||
-- DELETE FROM [dbo].[DisplayTabTmp];
|
||||
|
||||
-- Record current tab information
|
||||
INSERT INTO [dbo].[DisplayTabTmp] (itemid,DisplayTabID,DisplayTabName,userid,active, taborder)
|
||||
VALUES (@ItemID,@DisplayTabID,@DisplayTabName,@userID, 1, @order)
|
||||
END
|
||||
GO
|
||||
|
||||
-- SP: GetDisplayTabdata
|
||||
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[GetDisplayTabdata]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||
DROP PROCEDURE [GetDisplayTabdata];
|
||||
GO
|
||||
/****** Object: StoredProcedure [dbo].[GetDisplayTabdata] Script Date: 10/3/2024 11:29:44 AM ******/
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
-- =============================================
|
||||
-- Author: Paul Larsen
|
||||
-- Create date: 09/18/2024
|
||||
-- Description: retrieve PROMS edit tab saved state.
|
||||
-- =============================================
|
||||
CREATE PROCEDURE [dbo].[GetDisplayTabdata]
|
||||
(
|
||||
@UserID varchar(100)
|
||||
)
|
||||
|
||||
AS
|
||||
BEGIN
|
||||
-- SET NOCOUNT ON added to prevent extra result sets from
|
||||
-- interfering with SELECT statements.
|
||||
SET NOCOUNT ON;
|
||||
|
||||
SELECT [ItemID]
|
||||
,[DisplayTabID]
|
||||
,[DisplayTabName]
|
||||
,[UpdateDate]
|
||||
,[UserID]
|
||||
,[taborder]
|
||||
FROM [dbo].[DisplayTabTmp]
|
||||
WHERE UserID = @UserID AND Active = 1
|
||||
order by taborder
|
||||
END
|
||||
GO
|
||||
-- SP: DeactivateStateDisplayTabTmp
|
||||
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DeactivateStateDisplayTabTmp]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||
DROP PROCEDURE [DeactivateStateDisplayTabTmp];
|
||||
GO
|
||||
/****** Object: StoredProcedure [dbo].[DeactivateStateDisplayTabTmp] Script Date: 10/3/2024 11:30:53 AM ******/
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
-- =============================================
|
||||
-- Author: Paul Larsen
|
||||
-- Create date: 10/1/2024
|
||||
-- Description: Set PROMES Edit window tabs state inactive.
|
||||
-- =============================================
|
||||
CREATE procedure [dbo].[DeactivateStateDisplayTabTmp]
|
||||
(
|
||||
@UserID varchar(100)
|
||||
)
|
||||
|
||||
AS
|
||||
UPDATE [dbo].[DisplayTabTmp]
|
||||
SET Active = 0
|
||||
WHERE UserID = @UserID
|
||||
GO
|
||||
-- Table: DisplayTabTmp
|
||||
-- If DisplayTabTmp table already exists then don't drop and recreate it
|
||||
IF Not Exists(SELECT * FROM sys.objects Where name = 'DisplayTabTmp' AND type in (N'U'))
|
||||
Begin
|
||||
SET ANSI_NULLS ON
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
-- =============================================
|
||||
-- Author: Paul Larsen
|
||||
-- Create date: 9/30/2024
|
||||
-- Description: Table to hold tab state in PROMS editor.
|
||||
-- =============================================
|
||||
/****** Object: Table [dbo].[DisplayTabTmp] Script Date: 10/3/2024 11:22:00 AM ******/
|
||||
|
||||
CREATE TABLE [dbo].[DisplayTabTmp](
|
||||
[ID] [int] IDENTITY(1,1) NOT NULL,
|
||||
[ItemID] [int] NOT NULL,
|
||||
[DisplayTabID] [nvarchar](100) NOT NULL,
|
||||
[DisplayTabName] [nchar](100) NOT NULL,
|
||||
[UpdateDate] [datetime] NOT NULL,
|
||||
[UserID] [nchar](100) NOT NULL,
|
||||
[Active] [bit] NOT NULL,
|
||||
[taborder] [int] NOT NULL
|
||||
) ON [PRIMARY]
|
||||
|
||||
ALTER TABLE [dbo].[DisplayTabTmp] ADD CONSTRAINT [DF_DisplayTabTmp_UpdateDate] DEFAULT (getdate()) FOR [UpdateDate]
|
||||
|
||||
ALTER TABLE [dbo].[DisplayTabTmp] ADD CONSTRAINT [DF_DisplayTabTmp_Active] DEFAULT ((1)) FOR [Active]
|
||||
|
||||
ALTER TABLE [dbo].[DisplayTabTmp] ADD DEFAULT ((0)) FOR [taborder]
|
||||
|
||||
End
|
||||
GO
|
||||
/*
|
||||
==========================================================================================================
|
||||
End: C2017-031: SQL to allow copy/replace enhanced step
|
||||
@@ -24072,8 +23943,8 @@ BEGIN TRY -- Try Block
|
||||
DECLARE @RevDate varchar(255)
|
||||
DECLARE @RevDescription varchar(255)
|
||||
|
||||
set @RevDate = '10/03/2024 11:24'
|
||||
set @RevDescription = 'Add the ability for PROMS to remember the procedure tabs that were open when you closed PROMS'
|
||||
set @RevDate = '09/26/2024 11:24'
|
||||
set @RevDescription = 'SQL to allow copy/replace enhanced step.'
|
||||
|
||||
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
||||
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
||||
|
||||
@@ -1670,38 +1670,16 @@ namespace VEPROMS
|
||||
return;
|
||||
}
|
||||
|
||||
string stk = Volian.Base.Library.vlnStackTrace.StackToString();
|
||||
string stk = Volian.Base.Library.vlnStackTrace.StackToString();
|
||||
|
||||
if (!stk.Contains("Exception"))
|
||||
{
|
||||
// B2018-091 Allow PROMS to close if only MSWord sections have been opened.
|
||||
// B2019-071 we will now close one or all of the tabs (even step editor ones)
|
||||
if (_WeAreExitingPROMS)
|
||||
{
|
||||
string DisplayTabID = "";
|
||||
int pos;
|
||||
int TabItemID;
|
||||
string DisplayTabName = "";
|
||||
int cnt = 0;
|
||||
// Deactivate previous procedure tab state by user
|
||||
VEPROMS.CSLA.Library.Item.DeactivateStateDisplayTabTmp(MySessionInfo.UserID);
|
||||
// Save current procedure tab state
|
||||
foreach (KeyValuePair<string, DisplayTabItem> pgTab in tc._MyDisplayTabItems)
|
||||
{
|
||||
cnt++;
|
||||
DisplayTabID = pgTab.Key;
|
||||
TabItemID = Int32.Parse(DisplayTabID.Substring(DisplayTabID.IndexOf("Item - ") + 7));
|
||||
DisplayTabName = pgTab.Value.ToString();
|
||||
//tc.SelectedDisplayTabItem.MyStepTabPanel.ToString()
|
||||
VEPROMS.CSLA.Library.Item.AddDisplayTabsState(TabItemID, DisplayTabID, DisplayTabName, MySessionInfo.UserID, cnt);
|
||||
}
|
||||
}
|
||||
|
||||
int n = tc._MyDisplayTabItems.Count;
|
||||
|
||||
while (n-- > 0 && tc._MyDisplayTabItems.Count > 0)
|
||||
{
|
||||
|
||||
tc.CloseTabItem(tc.SelectedDisplayTabItem);
|
||||
|
||||
// B2019-071 close just the current tab and continue working
|
||||
@@ -2342,27 +2320,6 @@ namespace VEPROMS
|
||||
CurrentID = txtSearch.Text;
|
||||
}
|
||||
}
|
||||
|
||||
// Add retrieve displaytabs state here.
|
||||
openDisplaytabstate();
|
||||
}
|
||||
|
||||
public void openDisplaytabstate()
|
||||
{
|
||||
DataTable DisPlayTabState = VEPROMS.CSLA.Library.Item.GetDisplayTabs(VlnSettings.UserID);
|
||||
|
||||
if (DisPlayTabState.Rows.Count > 0)
|
||||
{
|
||||
foreach (DataRow TabState in DisPlayTabState.Rows)
|
||||
{
|
||||
int _ItemID = (int)TabState["ItemID"];
|
||||
//ItemInfoList _Procedures = ItemInfoList.GetList(_ItemID, (int)E_FromType.Procedure));
|
||||
ItemInfo _Procedure = ItemInfo.Get(_ItemID);
|
||||
//ItemInfo.Get
|
||||
//ItemInfo.Get
|
||||
OpenItem(_Procedure);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void tc_RefreshEnhancedDocument(object sender, ItemSelectedChangedEventArgs args)
|
||||
|
||||
@@ -8004,171 +8004,6 @@ namespace VEPROMS.CSLA.Library
|
||||
MyContent.Config = _ProcedureConfig.ToString();
|
||||
}
|
||||
#endregion
|
||||
public class DisplayTabs
|
||||
{
|
||||
private int _ItemID;
|
||||
public int ItemID
|
||||
{
|
||||
get { return _ItemID; }
|
||||
set { _ItemID = value; }
|
||||
|
||||
}
|
||||
private string _DisplayTabID;
|
||||
public string DisplayTabID
|
||||
{
|
||||
get { return _DisplayTabID; }
|
||||
set { _DisplayTabID = value; }
|
||||
}
|
||||
private string _DisplayTabName;
|
||||
public string DisplayTabName
|
||||
{
|
||||
get { return _DisplayTabName; }
|
||||
set { _DisplayTabName = value; }
|
||||
}
|
||||
|
||||
public SafeDataReader Dr { get; }
|
||||
|
||||
public DisplayTabs()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DisplayTabs(int itemID, String displayTabID, String displayTabName)
|
||||
{
|
||||
_ItemID = itemID;
|
||||
_DisplayTabID = displayTabID;
|
||||
_DisplayTabName = displayTabName;
|
||||
}
|
||||
|
||||
public DisplayTabs(SafeDataReader dr)
|
||||
{
|
||||
Dr = dr;
|
||||
}
|
||||
}
|
||||
public static DataTable GetDisplayTabs(int itemID) //, string displayTabID, string displayTabName)
|
||||
{
|
||||
try
|
||||
{
|
||||
DataTable tmp = DataPortal.Fetch<DataTable>(new DisplayTabs(itemID, "", "")); //, displayTabID, displayTabName));
|
||||
//ItemInfo.AddList(tmp);
|
||||
//tmp.AddEvents();
|
||||
return tmp;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new DbCslaException("Error on ItemInfoList.GetChildren", ex);
|
||||
}
|
||||
}
|
||||
private DataTable dt = new DataTable();
|
||||
private DataTable DataPortal_Fetch(DisplayTabs criteria)
|
||||
{
|
||||
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
try
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "GetDisplayTabData";
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
SqlDataAdapter da = new SqlDataAdapter(cm);
|
||||
da.Fill(dt);
|
||||
cn.Close();
|
||||
da.Dispose();
|
||||
return dt;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.DataPortal_Fetch", ex);
|
||||
throw new DbCslaException("ItemExt.DataPortal_Fetch", ex);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//public static void AddDisplayTabsState(int itemID, string displayTabID, string displayTabName)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// //DisplayTabs tmp =
|
||||
// DataPortal.Fetch<DisplayTabs>(new DisplayTabs(itemID, displayTabID, displayTabName)); //, displayTabID, displayTabName));
|
||||
// //ItemInfo.AddList(tmp);
|
||||
// //tmp.AddEvents();
|
||||
// //return tmp;
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// throw new DbCslaException("Error on ItemInfoList.GetChildren", ex);
|
||||
// }
|
||||
//}
|
||||
//private DataTable dt = new DataTable();
|
||||
//private void DataPortal_Fetch(int itemID, string displayTabID, string displayTabName)
|
||||
//{
|
||||
|
||||
// using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
// {
|
||||
// using (SqlCommand cm = cn.CreateCommand())
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// cm.CommandType = CommandType.StoredProcedure;
|
||||
// cm.CommandText = "AddDisplayTabState";
|
||||
// cm.CommandTimeout = Database.DefaultTimeout;
|
||||
// cm.Parameters.AddWithValue("@ItemID", ItemID);
|
||||
// cm.Parameters.AddWithValue("@displayTabID", displayTabID);
|
||||
// cm.Parameters.AddWithValue("@displayTabName", displayTabName);
|
||||
// cm.ExecuteNonQuery();
|
||||
// //SqlDataAdapter da = new SqlDataAdapter(cm);
|
||||
// //da.Fill(dt);
|
||||
// //cn.Close();
|
||||
// //da.Dispose();
|
||||
// //return dt; // fix
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// //if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.DataPortal_Fetch", ex);
|
||||
// throw new DbCslaException("ItemExt.DataPortal_Fetch", ex);
|
||||
// }
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
//}
|
||||
public static void AddDisplayTabsState(int itemID, string displayTabID, string displayTabName)
|
||||
//private void DataPortal_Fetch(int itemID, string displayTabID, string displayTabName)
|
||||
{
|
||||
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
try
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "AddDisplayTabState";
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
cm.Parameters.AddWithValue("@ItemID", itemID);
|
||||
cm.Parameters.AddWithValue("@displayTabID", displayTabID);
|
||||
cm.Parameters.AddWithValue("@displayTabName", displayTabName);
|
||||
cm.ExecuteNonQuery();
|
||||
//SqlDataAdapter da = new SqlDataAdapter(cm);
|
||||
//da.Fill(dt);
|
||||
//cn.Close();
|
||||
//da.Dispose();
|
||||
//return dt; // fix
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.AddDisplayTabsState", ex);
|
||||
throw new DbCslaException("ItemExt.AddDisplayTabsState", ex);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region SectionInfo
|
||||
|
||||
@@ -1132,91 +1132,6 @@ namespace VEPROMS.CSLA.Library
|
||||
throw new DbCslaException("Item.Add", ex);
|
||||
}
|
||||
}
|
||||
public static void DeactivateStateDisplayTabTmp(string UserID)
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
try
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "DeactivateStateDisplayTabTmp";
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
cm.Parameters.AddWithValue("@UserID", UserID);
|
||||
cm.ExecuteNonQuery();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.DeactivateStateDisplayTabTmp", ex);
|
||||
throw new DbCslaException("ItemExt.DeactivateStateDisplayTabTmp", ex);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void AddDisplayTabsState(int itemID, string displayTabID, string displayTabName, string UserID, int order)
|
||||
//private void DataPortal_Fetch(int itemID, string displayTabID, string displayTabName)
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
try
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "AddDisplayTabState";
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
cm.Parameters.AddWithValue("@ItemID", itemID);
|
||||
cm.Parameters.AddWithValue("@displayTabID", displayTabID);
|
||||
cm.Parameters.AddWithValue("@displayTabName", displayTabName);
|
||||
cm.Parameters.AddWithValue("@UserID", UserID);
|
||||
cm.Parameters.AddWithValue("@order", order);
|
||||
cm.ExecuteNonQuery();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.AddDisplayTabsState", ex);
|
||||
throw new DbCslaException("ItemExt.AddDisplayTabsState", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public static DataTable GetDisplayTabs(string UserID) //, string displayTabID, string displayTabName)
|
||||
//public static void DeactivateStateDisplayTabTmp(string UserID)
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
try
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "GetDisplayTabdata";
|
||||
cm.CommandTimeout = Database.DefaultTimeout;
|
||||
cm.Parameters.AddWithValue("@UserID", UserID);
|
||||
//cm.ExecuteNonQuery();
|
||||
SqlDataAdapter da = new SqlDataAdapter(cm);
|
||||
//da.Fill(dt);
|
||||
//cn.Close();
|
||||
//da.Dispose();
|
||||
//return dt; // fix
|
||||
|
||||
SqlDataReader reader = cm.ExecuteReader();
|
||||
DataTable dt = new DataTable();
|
||||
dt.Load(reader);
|
||||
return dt;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//if (_MyLog.IsErrorEnabled) _MyLog.Error("ItemExt.DeactivateStateDisplayTabTmp", ex);
|
||||
throw new DbCslaException("ItemExt.DeactivateStateDisplayTabTmp", ex);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
[Transactional(TransactionalTypes.TransactionScope)]
|
||||
protected override void DataPortal_Update()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user