示例#1
0
        private void BAddNew_Click(object sender, RoutedEventArgs e)
        {
            Transaction t = null;

            if (DGTranzs.SelectedItem == null)
            {
                return;
            }

            t = DGTranzs.SelectedItem as Transaction;
            if (t == null)
            {
                return;
            }
            Material m = null;

            using (var db = new Model1())
            {
                m = db.Materials.FirstOrDefault(tt => tt.MatId == t.MatId);
            }
            TransactionW tw = new TransactionW(m);

            tw.Owner = this;
            tw.ShowDialog();
            GO();
        }
示例#2
0
        private void BAddTranz_Click(object sender, RoutedEventArgs e)
        {
            Material m = null;

            if (DGMaterials.SelectedItem == null)
            {
                return;
            }

            m = DGMaterials.SelectedItem as Material;
            if (m == null)
            {
                return;
            }
            TransactionW tw = new TransactionW(m);

            tw.Owner = this;
            tw.ShowDialog();
            GO();
        }
示例#3
0
        private void DGTranzs_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            Transaction t = null;

            if (DGTranzs.SelectedItem == null)
            {
                return;
            }

            t = DGTranzs.SelectedItem as Transaction;
            if (t == null)
            {
                return;
            }
            TransactionW mw = new TransactionW(t);

            mw.Owner = this;
            mw.ShowDialog();

            GO();
        }
示例#4
0
        private void OnHyperlinkClick(object sender, RoutedEventArgs e)
        {
            Transaction t = null;

            if (DGTranzs.SelectedItem == null)
            {
                return;
            }

            t = DGTranzs.SelectedItem as Transaction;
            if (t == null)
            {
                return;
            }
            TransactionW mw = new TransactionW(t);

            mw.Owner = this;
            mw.ShowDialog();

            GO();
        }