public Contract(bool isDet, DataRow detRow = null, ICommMainUI contextMain = null)
 {
     InitializeComponent();
     this.DataContext = this;
     isDetalii = isDet;
     isEnabled = !isDet;
     btnSaveContract.Content = ADAUGA;
     this.contextMain = contextMain;
     id = -1;
     if (detRow != null)
     {
         btnSaveContract.Content = SALVEAZA;
         id = (int)detRow["Id"];
         loadDatas(detRow);
     }
     DataTable dt = new DataTable();
     try
     {
         dt = DAL.getInstance().select("Select * FROM Programe WHERE Status=1");
         if (dt != null)
         {
             Console.WriteLine("Not null");
             foreach (DataRow key in dt.Rows)
             {
                 Console.WriteLine(key);
                 comboProgram.Items.Add(key["Denumire"] as string);
             }
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
 public Programe(bool isDet, DataRow detRow = null, ICommMainUI contextMain = null)
 {
     InitializeComponent();
     this.DataContext = this;
     isDetalii = isDet;
     isEnabled = !isDet;
     btnSave.Content = ADAUGA;
     this.contextMain = contextMain;
     id = -1;
     if (detRow != null)
     {
         btnSave.Content = SALVEAZA;
         id = (int)detRow["Id"];
         loadDatas(detRow);
     }
 }
 public Candidat(bool isDet,DataRow detRow = null,ICommMainUI contextMain = null)
 {
     InitializeComponent();
     this.DataContext = this;
     isDetalii = isDet;
     isEnabled = !isDet;
     btnAdd.Content = ADAUGA;
     this.contextMain = contextMain;
     id = -1;
     if (detRow != null)
     {
         btnAdd.Content = SALVEAZA;
         id =(int) detRow["Id"];
         loadDatas(detRow);
     }
     else
     {
         tabContract.IsEnabled = false;
         tabIncasari.IsEnabled = false;
         tabPrograme.IsEnabled = false;
     }
 }