B2017-219 if a word section cannot be opened because it is gotten from a bad database record, then create a blank word document and open it
This commit is contained in:
@@ -93,26 +93,27 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
#endregion
|
||||
#region Constructors
|
||||
public DisplayTabItem(IContainer container, DisplayTabControl myDisplayTabControl, ItemInfo myItemInfo, string myKey)
|
||||
{
|
||||
_MyItemInfo = myItemInfo;
|
||||
if(MyItemInfo.MyContent.MyEntry == null)
|
||||
OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyProcedure.ItemID, CheckOutType.Procedure);
|
||||
else
|
||||
OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyContent.MyEntry.DocID, CheckOutType.Document);
|
||||
//Console.WriteLine("DisplayTabItem");
|
||||
_MyKey = myKey;
|
||||
_MyDisplayTabControl = myDisplayTabControl;
|
||||
container.Add(this);
|
||||
InitializeComponent();
|
||||
this.Click += new EventHandler(DisplayTabItem_Click);
|
||||
if (myItemInfo.MyContent.MyEntry == null)
|
||||
SetupStepTabPanel();
|
||||
else
|
||||
SetupDSOTabPanel();
|
||||
SetupSecurity(myItemInfo);
|
||||
Name = string.Format("DisplayTabItem {0}", myItemInfo.ItemID);
|
||||
}
|
||||
public DisplayTabItem(IContainer container, DisplayTabControl myDisplayTabControl, ItemInfo myItemInfo, string myKey)
|
||||
{
|
||||
_MyItemInfo = myItemInfo;
|
||||
if (MyItemInfo.MyContent.MyEntry == null)
|
||||
OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyProcedure.ItemID, CheckOutType.Procedure);
|
||||
else
|
||||
OwnerID = myDisplayTabControl.MySessionInfo.CheckOutItem(myItemInfo.MyContent.MyEntry.DocID, CheckOutType.Document);
|
||||
//Console.WriteLine("DisplayTabItem");
|
||||
_MyKey = myKey;
|
||||
_MyDisplayTabControl = myDisplayTabControl;
|
||||
container.Add(this);
|
||||
InitializeComponent();
|
||||
this.Click += new EventHandler(DisplayTabItem_Click);
|
||||
if (myItemInfo.MyContent.MyEntry == null)
|
||||
SetupStepTabPanel();
|
||||
else
|
||||
SetupDSOTabPanel();
|
||||
SetupSecurity(myItemInfo);
|
||||
if (MyDSOTabPanel == null || MyDSOTabPanel.MyEdWord != null) // B2017-219 check needed if we could not open a word attachment
|
||||
Name = string.Format("DisplayTabItem {0}", myItemInfo.ItemID);
|
||||
}
|
||||
private bool MesssageShown = false;
|
||||
public void SetupSecurity(ItemInfo myItem)
|
||||
{
|
||||
@@ -302,6 +303,7 @@ namespace Volian.Controls.Library
|
||||
EntryInfo myEntry = _MyItemInfo.MyContent.MyEntry;
|
||||
UserInfo ui = UserInfo.GetByUserID(OwnerInfo.Get(OwnerID).SessionUserID);
|
||||
_MyDSOTabPanel = new DSOTabPanel(myEntry.MyDocument, _MyDisplayTabControl, _MyItemInfo, UserInfo.CanEdit(ui,MyItemInfo.MyDocVersion));
|
||||
if (_MyDSOTabPanel.MyEdWord == null) return; // B2017-219 if we could not open the word attachment just return
|
||||
//
|
||||
// tabItem
|
||||
//
|
||||
|
Reference in New Issue
Block a user