Sunday, January 30, 2011

WPF Combobox Selected Index Change

private void cmbPCNo_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            try
            {
                string PCName = cmbPCNo.SelectedValue as string;
                txtUserTicket.Text = objTimeManagementManager.GetTicketNoManager(PCName, DateTime.Today);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.Message, "PC Name", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }

C# print file on LAN Printer

If you want to print any file on network printer then you can try with this code block // Change Default Printer System.Ma...