private void Window_Loaded(object sender, RoutedEventArgs e) { classDG.LoadDB("Select * from dbo.ViewListLead " + $"Where Login='******' " + $"and NameStatus='Активный' " + $"Order by DateTimeLeadCreated DESC"); classCB.LoadCB(CbUser); classCB.LoadCBLead(CbStatus); }
private void Window_Loaded(object sender, RoutedEventArgs e) { try { classCB.LoadCBLead(CbStatus); sqlConnection.Open(); sqlCommand = new SqlCommand("Select * from dbo.ViewListLead " + $"Where [IdLead]=" + $"'{FolderClass.ClassLead.IdLead}'", sqlConnection); dataReader = sqlCommand.ExecuteReader(); dataReader.Read(); DpDateTimeLeadCreated.Text = dataReader[4].ToString(); TbNumberPhone.Text = dataReader[2].ToString(); TbComment.Text = dataReader[7].ToString(); TbMasteringSalesSkills.Text = dataReader[3].ToString(); TbKnowledgeOfCompanysProducts.Text = dataReader[8].ToString(); TbWorkingWithObjections.Text = dataReader[9].ToString(); TbFIO.Text = dataReader[1].ToString(); classDG.LoadDB("Select * From dbo.ViewListCall " + $"Where NumberPhoneLead='{TbNumberPhone.Text}'"); } catch (Exception ex) { FolderClass.ClassMB.MBError(ex); } finally { sqlConnection.Close(); } if (CbStatus.Text == "Неактивный") { BtnSave.IsEnabled = false; } }
private void Window_Loaded(object sender, RoutedEventArgs e) { classDG.LoadDB("Select * from dbo.[User]"); }