Exemplo n.º 1
0
        private DataTable D6_EndWelding(Bracket bracket)
        {
            var columName = LocateColumnD6(bracket.ArmLength);
            var dt        = SQLiteHelper.Read("Hansa.db", "SELECT * FROM d6 WHERE type='II'");
            var query     = dt.AsEnumerable().Where(t => t.Field <double>(columName) > bracket.Load);
            var table     = query.AsDataView().ToTable(true, new string[] { "steel", columName });

            return(table);
        }
Exemplo n.º 2
0
        private void BtnD19_Click(object sender, EventArgs e)
        {
            lstD19.Items.Clear();
            var bracket = new Bracket();

            int.TryParse(txtLoad_D19.Text, out bracket.Load);
            bracket.Load = bracket.Load * 10 / 1000; // kg→kN
            int.TryParse(txtArmLength_D19.Text, out bracket.ArmLength);
            if (bracket.Load <= 0 || bracket.ArmLength <= 0)
            {
                return;
            }
            if (rioEndWelding_D19.Checked)
            {
                Common.DataTable2Listview(lstD19, D19_EndWelding(bracket));
            }
            else
            {
                Common.DataTable2Listview(lstD19, D19_SideWelding(bracket));
            }
        }