public virtual bool Read() { if (HFile == null) { return(false); } try { Record = HFile.ReadLine(); } catch (System.Exception Excpt) { Err.Add(Excpt); return(false); } if (Record == null) { return(false); } else { return(true); } }
public CConnection(string ConnectionString) { if (ConnectionString == null) { Conn = null; return; } Conn = new System.Data.SqlClient.SqlConnection(); Conn.InfoMessage += new System.Data.SqlClient.SqlInfoMessageEventHandler(Err.OnInfoMessage); if (Conn == null) { return; } Conn.ConnectionString = ConnectionString; try { Conn.Open(); } catch (System.Exception Excpt) { Err.Add(Excpt); Close(); } }
public virtual bool Add(string Value) { if (HFile == null) { return(false); } if (Value == null) { return(false); } try { HFile.Write(Value); } catch (System.Exception Excpt) { Err.Add(Excpt); return(false); } return(true); }
public bool AppendToFile(string FileName, int CharSet) { if (FileName == null) { return(false); } if (FileName.Length == 0) { return(false); } try { HFile = new System.IO.StreamWriter(FileName, true, System.Text.Encoding.GetEncoding(CharSet)); ((System.IO.StreamWriter)HFile).Write(ToString()); ((System.IO.StreamWriter)HFile).Close(); HFile = null; } catch (System.Exception Excpt) { Err.Add(Excpt); return(false); } return(true); }
public int Add(params object[] ObjectList) { Validate(); if (ObjectList == null) { return(-1); } try { foreach (object Obj in ObjectList) { if (!(Obj == null)) { Buffer.Append(Obj.ToString()); } } } catch (System.Exception Excpt) { Err.Add(Excpt); return(-1); } return((Length()) - 1); }
public void Add(params object[] ObjectList) { if (ObjectList == null) { return; } if (ObjectList.Length == 0) { return; } try { foreach (object Obj in ObjectList) { if (!(Obj == null)) { base.Add(Obj); } } } catch (System.Exception Excpt) { Err.Add(Excpt); } }
public bool AppendToFile(string FileName) { Validate(); if (FileName == null) { return(false); } if (FileName.Length == 0) { return(false); } try { HFile = new System.IO.FileStream(FileName, System.IO.FileMode.Append, System.IO.FileAccess.Write); ((System.IO.FileStream)HFile).Write(Buffer.ToArray(), 0, Length()); ((System.IO.FileStream)HFile).Close(); HFile = null; } catch (System.Exception Excpt) { Err.Add(Excpt); return(false); } return(true); }
public bool Open(string FileName) { if (FileName == null) { return(false); } if (FileName.Trim() == "") { return(false); } if (!(HFile == null)) { Close(); } try { HFile = new System.IO.FileStream(FileName, System.IO.FileMode.Open, System.IO.FileAccess.Read); } catch (System.Exception Excpt) { Err.Add(Excpt); return(false); } return(true); }
public int Add(System.Collections.IEnumerable ObjectList) { Validate(); int Result = 0; if (ObjectList == null) { return(-1); } try { foreach (object Obj in ObjectList) { if (!(Obj == null)) { Result = Buffer.Add(Obj.ToString()); } } } catch (System.Exception Excpt) { Err.Add(Excpt); return(-1); } return(Result); }
public void Add(System.Collections.IEnumerable ObjectList) { if (ObjectList == null) { return; } try { foreach (object Obj in ObjectList) { if (!(Obj == null)) { try { base.Add(Obj.ToString()); } catch (System.Exception Excpt) { Err.Add(Excpt); } } } } catch (System.Exception Excpt) { Err.Add(Excpt); } return; }