Exemplo n.º 1
0
        /// <summary>
        /// 生成清单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CreateCMD_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                int num = 1;
                MessageBoxResult result = MessageBoxX.Show("选择【不】生成单托任务;\r选择【是的】生成双托任务,请确认!!!", "提示", System.Windows.Application.Current.MainWindow, MessageBoxButton.YesNo);
                if (result == MessageBoxResult.Yes)
                {
                    num = 2;
                }
                W_TaskData_CMD _cmd = new W_TaskData_CMD("", 0, num);
                _cmd.ShowDialog();

                RefreshData();
            }
            catch (Exception ex)
            {
                Notice.Show("生成失败: " + ex.ToString(), "错误", 3, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 更新清单
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void UpdateCMD_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                // 获取清单号
                if (DGcommand.SelectedItem == null)
                {
                    return;
                }
                string wcs = (DGcommand.SelectedItem as DataRowView).Row[0].ToString();

                W_TaskData_CMD _cmd = new W_TaskData_CMD(wcs, 1, 0);
                _cmd.ShowDialog();

                RefreshData();
            }
            catch (Exception ex)
            {
                Notice.Show("更新失败: " + ex.ToString(), "错误", 3, MessageBoxIcon.Error);
            }
        }