Exemple #1
0
        private void btnShowReadinessForm(object sender, RoutedEventArgs e)
        {
            IDictionary<string, string> urlparams = HtmlPage.Document.QueryString;
            if (!urlparams.Keys.Contains("orderid"))
            {
                MessageBox.Show("Возможность проставить готовность есть только для приказных составов");
                return;
            }

            var current_row = this._transfer;

            var modalForm = new ReadinessForm()
            {
                product_pn1 = current_row.prod_pn2,
                product_id = new Guid(urlparams["prodid"]),
                order_id = new Guid(urlparams["orderid"]),
                current_date = DateTime.Now,
            };
            modalForm.Show();
        }
Exemple #2
0
        private void ShowReadinessForm(object sender, RoutedEventArgs e)
        {
            IDictionary<string, string> urlparams = HtmlPage.Document.QueryString;
            if (grid.SelectedItems.Count != 1) return;

            var current_row = grid.SelectedItem as transfer_ware;

            var modalForm = new ReadinessForm()
            {
                product_pn1 = current_row.ware_pn1,
                product_id = current_row.ware_id,
                order_id = current_row.order_id,
                current_date = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc),
            };
            modalForm.Closed += new EventHandler(delegate(Object sender2, EventArgs e2)
                {
                    current_row.gotov_him_date = modalForm.techn_dates.him_date;
                    current_row.gotov_techn_date = modalForm.techn_dates.techn_date;
                    current_row.gotov_svar_date = modalForm.techn_dates.svar_date;
                });
            modalForm.Show();
        }