Exemplo n.º 1
0
        private void btnImport_Click(object sender, RoutedEventArgs e)
        {
            OptionEquipment frm = new OptionEquipment();

            frm.Owner = this;

            frm.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            frm.dbFile = dbFile;
            frm.eqType = eqType;
            if (frm.ShowDialog() == true)
            {
                op = 0;
                dtFeed.Rows.Clear();
                dtProd.Rows.Clear();
                dtSource.Rows.Clear();
                dtSink.Rows.Clear();
                dtCondenser.Rows.Clear();
                dtHxCondenser.Rows.Clear();
                dtReboiler.Clear();
                dtHxReboiler.Rows.Clear();
                dtTower.Rows.Clear();
                przFile = frm.przFile;
                dsTower = (DataSet)Application.Current.Properties["eqInfo"];
                Application.Current.Properties.Remove("eqInfo");
                bindTowerInfo();
                bindCombox();
                txtName.BorderBrush            = Brushes.Green;
                txtName.BorderThickness        = new Thickness(2, 2, 2, 2);
                txtStageNumber.BorderBrush     = Brushes.Green;
                txtStageNumber.BorderThickness = new Thickness(2, 2, 2, 2);
            }
        }
Exemplo n.º 2
0
        private void btnImport_Click(object sender, RoutedEventArgs e)
        {
            OptionEquipment frm = new OptionEquipment();

            frm.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            frm.dbFile = dbFile;
            frm.eqType = eqType;
            if (frm.ShowDialog() == true)
            {
                DataSet   eqInfo = (DataSet)Application.Current.Properties["eqInfo"];
                DataTable dt     = eqInfo.Tables[0];
                DataRow   dr     = dt.Rows[0];
                txtName.Text = dr["eqname"].ToString();
                bindCombox(dr["feeddata"].ToString(), startCbox);
                bindCombox(dr["productdata"].ToString(), endCbox);
                Application.Current.Properties.Remove("eqInfo");
            }
        }