/// <summary> /// function to create window /// </summary> /// <param name="DisplayName">name of window</param> /// <returns>int (Window ID)</returns> private int CreateVerWindow(string DisplayName, string TabName) { // create new version window MWindow verWnd = new MWindow(GetCtx(), 0, Get_TrxName()); verWnd.SetName(DisplayName + "_" + TabName); verWnd.SetDisplayName(DisplayName); // set window as Query Only verWnd.SetWindowType("Q"); verWnd.SetDescription("Display version data"); verWnd.SetHelp("The window allows you to view past data versioning and future updation versions (if any)."); if (!verWnd.Save()) { ValueNamePair vnp = VLogger.RetrieveError(); string error = ""; if (vnp != null) { error = vnp.GetName(); if (error == "" && vnp.GetValue() != null) { error = vnp.GetValue(); } } if (error == "") { error = "Error in creating Version Window"; } log.Log(Level.SEVERE, "Version Window not Created :: " + DisplayName + " :: " + error); Get_TrxName().Rollback(); return(0); } // Return Window ID return(verWnd.GetAD_Window_ID()); }