Exemple #1
0
        public static ObservableCollection<ProjInfoData> GetProjInfoDatas(string dbName)
        {
            var list = new ObservableCollection<ProjInfoData>();
            if (File.Exists(dbName))
            {
                using (var deLinker = new DbOperator(dbName, DbCategory.Accdb))
                {
                    DataSet ds = deLinker.ExecuteDataSet("select * from ItemToData");
                    if (ds.Tables.Count == 0)
                        return list;

                    foreach (DataRow row in ds.Tables[0].Rows)
                    {
                        var data = new ProjInfoData
                        {
                            NumIndex = Convert.ToInt32(row["NumIndex"]),
                            ProjInfo = row["ProjInfo"].ToString(),
                            Unit = row["Unit"].ToString(),
                        };
                        list.Add(data);
                    }
                }
            }
            return list;
        }
Exemple #2
0
 private void WindowOnActionEvent(ProjInfoData data)
 {
     ItemsPool.Add(data);
 }