using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using GZTW.AyaNova.BLL; using Infragistics.Win; using log4net; namespace AyaNova { /// /// Summary description for RecordHistoryForm. /// public class RecordHistoryForm : System.Windows.Forms.Form { // Create a logger for use in this class //case 1039 private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); private Infragistics.Win.Misc.UltraLabel lblRecordHistoryCreator; private Infragistics.Win.Misc.UltraLabel lblRecordHistoryModifier; private Infragistics.Win.Misc.UltraLabel lblRecordHisotryCreated; private Infragistics.Win.Misc.UltraLabel lblRecordHistoryModified; private Infragistics.Win.Misc.UltraLabel lblCreator; private Infragistics.Win.Misc.UltraLabel lblModifier; private Infragistics.Win.Misc.UltraLabel lblCreated; private Infragistics.Win.Misc.UltraLabel lblModified; /// /// Required designer variable. /// private System.ComponentModel.Container components = null; public RecordHistoryForm(Guid Creator, Guid Modifier, string CreatedDate, string ModifiedDate) { //case 1039 //log.Debug("RecordHistoryForm()"); // // Required for Windows Form Designer support // InitializeComponent(); this.Icon = Resource1.RecordHistory16icon; Util.Localize(this); lblModifier.Text=GetName(Modifier); lblCreator.Text=GetName(Creator); lblModified.Text=ModifiedDate; lblCreated.Text=CreatedDate; } /// /// Clean up any resources being used. /// protected override void Dispose( bool disposing ) { if( disposing ) { if(components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance(); Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance(); this.lblRecordHistoryCreator = new Infragistics.Win.Misc.UltraLabel(); this.lblRecordHistoryModifier = new Infragistics.Win.Misc.UltraLabel(); this.lblRecordHisotryCreated = new Infragistics.Win.Misc.UltraLabel(); this.lblRecordHistoryModified = new Infragistics.Win.Misc.UltraLabel(); this.lblCreator = new Infragistics.Win.Misc.UltraLabel(); this.lblModifier = new Infragistics.Win.Misc.UltraLabel(); this.lblCreated = new Infragistics.Win.Misc.UltraLabel(); this.lblModified = new Infragistics.Win.Misc.UltraLabel(); this.SuspendLayout(); // // lblRecordHistoryCreator // this.lblRecordHistoryCreator.Location = new System.Drawing.Point(10, 9); this.lblRecordHistoryCreator.Name = "lblRecordHistoryCreator"; this.lblRecordHistoryCreator.Size = new System.Drawing.Size(297, 19); this.lblRecordHistoryCreator.TabIndex = 0; this.lblRecordHistoryCreator.Tag = ""; this.lblRecordHistoryCreator.Text = "LT:UI.RecordHistory.Creator"; // // lblRecordHistoryModifier // this.lblRecordHistoryModifier.Location = new System.Drawing.Point(10, 65); this.lblRecordHistoryModifier.Name = "lblRecordHistoryModifier"; this.lblRecordHistoryModifier.Size = new System.Drawing.Size(297, 18); this.lblRecordHistoryModifier.TabIndex = 1; this.lblRecordHistoryModifier.Tag = ""; this.lblRecordHistoryModifier.Text = "LT:UI.RecordHistory.Modifier"; // // lblRecordHisotryCreated // this.lblRecordHisotryCreated.Location = new System.Drawing.Point(317, 9); this.lblRecordHisotryCreated.Name = "lblRecordHisotryCreated"; this.lblRecordHisotryCreated.Size = new System.Drawing.Size(259, 19); this.lblRecordHisotryCreated.TabIndex = 2; this.lblRecordHisotryCreated.Tag = ""; this.lblRecordHisotryCreated.Text = "LT:UI.RecordHistory.Created"; // // lblRecordHistoryModified // this.lblRecordHistoryModified.Location = new System.Drawing.Point(317, 65); this.lblRecordHistoryModified.Name = "lblRecordHistoryModified"; this.lblRecordHistoryModified.Size = new System.Drawing.Size(269, 18); this.lblRecordHistoryModified.TabIndex = 3; this.lblRecordHistoryModified.Tag = ""; this.lblRecordHistoryModified.Text = "LT:UI.RecordHistory.Modified"; // // lblCreator // appearance1.ForeColor = System.Drawing.SystemColors.WindowText; this.lblCreator.Appearance = appearance1; this.lblCreator.BackColorInternal = System.Drawing.SystemColors.Window; this.lblCreator.Location = new System.Drawing.Point(10, 28); this.lblCreator.Name = "lblCreator"; this.lblCreator.Size = new System.Drawing.Size(297, 18); this.lblCreator.TabIndex = 7; // // lblModifier // appearance2.ForeColor = System.Drawing.SystemColors.WindowText; this.lblModifier.Appearance = appearance2; this.lblModifier.BackColorInternal = System.Drawing.SystemColors.Window; this.lblModifier.Location = new System.Drawing.Point(10, 83); this.lblModifier.Name = "lblModifier"; this.lblModifier.Size = new System.Drawing.Size(297, 19); this.lblModifier.TabIndex = 8; // // lblCreated // appearance3.ForeColor = System.Drawing.SystemColors.WindowText; this.lblCreated.Appearance = appearance3; this.lblCreated.BackColorInternal = System.Drawing.SystemColors.Window; this.lblCreated.Location = new System.Drawing.Point(317, 28); this.lblCreated.Name = "lblCreated"; this.lblCreated.Size = new System.Drawing.Size(269, 18); this.lblCreated.TabIndex = 9; // // lblModified // appearance4.ForeColor = System.Drawing.SystemColors.WindowText; this.lblModified.Appearance = appearance4; this.lblModified.BackColorInternal = System.Drawing.SystemColors.Window; this.lblModified.Location = new System.Drawing.Point(317, 83); this.lblModified.Name = "lblModified"; this.lblModified.Size = new System.Drawing.Size(269, 19); this.lblModified.TabIndex = 10; // // RecordHistoryForm // this.AutoScaleBaseSize = new System.Drawing.Size(6, 15); this.ClientSize = new System.Drawing.Size(601, 127); this.Controls.Add(this.lblModified); this.Controls.Add(this.lblCreated); this.Controls.Add(this.lblModifier); this.Controls.Add(this.lblCreator); this.Controls.Add(this.lblRecordHistoryModified); this.Controls.Add(this.lblRecordHisotryCreated); this.Controls.Add(this.lblRecordHistoryModifier); this.Controls.Add(this.lblRecordHistoryCreator); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.Name = "RecordHistoryForm"; this.ShowInTaskbar = false; this.Text = "LT:UI.Command.RecordHistory"; this.ResumeLayout(false); } #endregion // __ _ _ ___ ____ __ __ __ __ __ ___ ___ // / _)( )( )/ __)(_ _)/ \( \/ ) / _)/ \( \( _) // ( (_ )()( \__ \ )( ( () )) ( ( (_( () )) ) )) _) // \__) \__/ (___/ (__) \__/(_/\/\_) \__)\__/(___/(___) // //Plus constructor above /// /// Build up a name string from passed in user record id /// /// /// private string GetName(Guid UserID) { //case 1039 //log.Debug("GetName"); if(UserID==Guid.Empty) return ""; NameFetcher nf = NameFetcher.GetItem("User","FirstName",UserID); string sFirst= nf.RecordName; nf=NameFetcher.GetItem("User","LastName",UserID); string sLast=nf.RecordName; nf=NameFetcher.GetItem("User","Initials",UserID); string sInitials = nf.RecordName; return sFirst + " " + sLast + " (" + sInitials + ")"; } } }