private bool UpdateValue(CColumn item) { string str = modSQL.UpdateColumn(item); return CDatabase.Instance.ExecuteNonQuery(str); }
private bool AddValue(CColumn item, SqlCeTransaction tr) { string str = modSQL.InsertColumn(item); return CDatabase.Instance.ExecuteNonQuery(str, tr); }
public static string InsertColumn(CColumn item) { string str = @"INSERT INTO Conf_Dyn_Properties(Id, Name, CollType, TableId) VALUES('{0}','{1}','{2}','{3}')"; return string.Format(str, item.Id, item.Name, item.CollType, item.TableId, item.Id); }
public IEnumerable<CColumn> LoadCollumns() { List<CColumn> list = new List<CColumn>(); CColumn item = null; SqlCeDataReader reader = null; try { reader = CDatabase.Instance.Execute(modSQL.SelectCollumns()); while (reader.Read()) { item = new CColumn(); item.Id = reader.GetClearStr(0); item.Name = reader.GetClearStr(1); item.CollType = reader.GetClearStr(2); item.TableId = reader.GetClearStr(3); item.Status = Status.Normal; list.Add(item); } } catch (Exception ex) { } finally { if (reader != null && !reader.IsClosed) reader.Close(); } return list; }
public static string UpdateColumn(CColumn item) { string str = @"UPDATE Conf_Dyn_Properties(Name, CollType, TableId) Set('{0}','{1}','{2}') Where Id='{3}'"; return string.Format(str, item.Id, item.Name, item.CollType, item.TableId, item.Id); }