/// <summary> /// Create tab panel for Version window's Tab /// </summary> /// <param name="tab"></param> public void CreateVerTabPanel(MTab tab) { int AD_TabPanel_ID = Util.GetValueOfInt(DB.ExecuteScalar("SELECT AD_TabPanel_ID FROM AD_TabPanel WHERE Classname = '" + className + "' AND AD_Tab_ID = " + tab.GetAD_Tab_ID(), null, null)); if (AD_TabPanel_ID <= 0) { MTabPanel tbPnl = new MTabPanel(GetCtx(), 0, Get_TrxName()); tbPnl.SetAD_Client_ID(tab.GetAD_Client_ID()); tbPnl.SetAD_Org_ID(tab.GetAD_Org_ID()); tbPnl.SetAD_Tab_ID(tab.GetAD_Tab_ID()); tbPnl.SetAD_Window_ID(tab.GetAD_Window_ID()); tbPnl.SetClassname(className); tbPnl.SetName(tab.GetName() + " " + Msg.GetMsg(GetCtx(), "VersionHistory")); tbPnl.SetIsDefault(true); tbPnl.SetSeqNo(Util.GetValueOfInt(DB.ExecuteScalar("SELECT (NVL(MAX(SeqNo), 0) + 10) FROM AD_TabPanel WHERE AD_Tab_ID = " + tab.GetAD_Tab_ID(), null, null))); if (!tbPnl.Save()) { log.SaveError("MasterVerField", "Tab Panel data not created"); } } }