Example #1
0
 public static DataTable Search(string keyword)
 {
     try
     {
         DbManager      dm      = DbManager.Ins;
         MySqlParameter p_input = new MySqlParameter("_keyword", MySqlDbType.String);
         p_input.Value = keyword;
         MySqlParameter[] pars = new MySqlParameter[] { p_input };
         DataTable        dt   = dm.ExecuteProcQuery("Project_SearchWithKeyword", pars);
         if (dt == null)
         {
             return(null);
         }
         dt.Columns.Add("time_", typeof(DateTime));
         dt.Columns.Add("mode_", typeof(string));
         dt.Columns.Add("type_", typeof(string));
         foreach (DataRow dr in dt.Rows)
         {
             double          t    = (double)dr["time"];
             CalculationMode mode = (CalculationMode)dr["mode"];
             GeometrySchema  type = (GeometrySchema)dr["type"];
             dr["time_"] = GlobalTool.ConvertIntDateTime(t);
             dr["mode_"] = (mode == CalculationMode.Temperature?"温度":"厚度");
             dr["type_"] = (type == GeometrySchema.Plate ? "平板" : "圆筒");
         }
         dt.Columns.Remove("mode");
         dt.Columns.Remove("type");
         return(dt);
     }
     catch (Exception)
     {
         return(null);
     }
 }
Example #2
0
 public HotfaceParameterForm(GeometrySchema _schema, double _RorW, double _LorH)
 {
     InitializeComponent();
     Schema = _schema;
     Radius = _RorW;
     Length = _LorH;
 }