public static void UpdateWorkDay(DayInfo values) { cmd_update.Parameters["@Date"].Value = values.getDate(); cmd_update.Parameters["@PSname"].Value = values.getPSname(); cmd_update.Parameters["@PSaddr"].Value = values.getPSaddress(); cmd_update.Parameters["@PSworktime"].Value = values.getPSworkTime(); cmd_update.Parameters["@Сost"].Value = values.getCost(); cmd_update.Parameters["@IsSubUrban"].Value = values.getSubUrbFlag(); DBconnection.Open(); cmd_update.ExecuteNonQuery(); DBconnection.Close(); }
public NewWorkDayForm(DayInfo SelectedDateInfo) //Форма редактирования смены { InitializeComponent(); wDateBlock.Text = SelectedDateInfo.getDate().GetDateTimeFormats('D')[1]; wPSnameBox.Text = SelectedDateInfo.getPSname(); wPSaddressBox.Text = SelectedDateInfo.getPSaddress(); wPSworkTimeBox.Text = SelectedDateInfo.getPSworkTime(); wCostBox.Text = SelectedDateInfo.getCost().ToString(); wIsSubUrbFlag.IsChecked = SelectedDateInfo.getSubUrbFlag(); UpdWorkDayButton.Visibility = System.Windows.Visibility.Visible; wTitle.Content = "Редактирование смены"; }