void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.w = ((HRManagerClient.CreateAskLeaveDialog)(target));
         return;
     }
     this._contentLoaded = true;
 }
        protected override void AddItem()
        {
            CreateAskLeaveDialog dlg = new CreateAskLeaveDialog(new AskLeave());

            if (dlg.ShowDialog())
            {
                foreach (var selectedEmployee in dlg.SelectedEmployees)
                {
                    var akl = (dlg.ModelExample as AskLeave).Clone();
                    akl.Employee = selectedEmployee;
                    Model.AddWithEntity(akl);
                    System.Diagnostics.Trace.WriteLine("DBData Added!", typeof(AskLeave).Name);
                }
            }
            else
            {
                System.Diagnostics.Trace.WriteLine("DBData Add FAIL!", typeof(AskLeave).Name);
            }
        }