Exemplo n.º 1
0
        public ActLogs()
        {
            DataTable     dt = null;
            StringBuilder sb = new StringBuilder();

            sb.Append("select room, memo, regdate from tbl_log where datediff(day, cast(regdate as date), current_date)<=1 order by regdate desc");

            using (FirebirdDBHelper db = new FirebirdDBHelper(sb.ToString(), util.strDBConn))
            {
                try
                {
                    dt = db.GetDataTable();
                }
                catch (FirebirdSql.Data.FirebirdClient.FbException ex)
                {
                    util.WriteLog(string.Format("DB Error ({0}) : {1}", this.GetType(), ex.Message));
                }
            }

            foreach (DataRow row in dt.Rows)
            {
                this.Add(new ActLog()
                {
                    TELNUM = row[0].ToString(), DETAIL = row[1].ToString()
                });
            }
        }
Exemplo n.º 2
0
        private void INIT()
        {
            DataTable     dt = null;
            StringBuilder sb = new StringBuilder();

            sb.Append("select prefix, type, rate, sec from DOMESTIC_RATE order by prefix asc");

            using (FirebirdDBHelper db = new FirebirdDBHelper(sb.ToString(), util.strDBConn))
            {
                try
                {
                    dt = db.GetDataTable();
                }
                catch (FirebirdSql.Data.FirebirdClient.FbException fex)
                {
                    util.WriteLog(string.Format("{0} INIT ERR : {1}", this.GetType(), fex.Message));
                    return;
                }
            }

            _list = new ObservableCollection <DOMESTICRATE>(
                (from _row in dt.AsEnumerable()
                 select new DOMESTICRATE()
            {
                prefix = _row["prefix"].ToString()
                ,
                type = _row["type"].ToString()
                ,
                rate = float.Parse(_row["rate"].ToString())
                ,
                sec = int.Parse(_row["sec"].ToString())
            }
                ).ToList <DOMESTICRATE>()
                );
        }
Exemplo n.º 3
0
        private void INIT()
        {
            DataTable     dt = null;
            StringBuilder sb = new StringBuilder();

            sb.Append("select idx, title from FIRMS order by title asc");

            using (FirebirdDBHelper db = new FirebirdDBHelper(sb.ToString(), util.strDBConn))
            {
                try
                {
                    dt = db.GetDataTable();
                }
                catch (FirebirdSql.Data.FirebirdClient.FbException fex)
                {
                    util.WriteLog(string.Format("{0} INIT ERR : {1}", this.GetType(), fex.Message));
                    return;
                }
            }

            _list = new List <Firm>(
                (from _row in dt.AsEnumerable()
                 select new Firm()
            {
                idx = int.Parse(_row["idx"].ToString())
                ,
                title = _row["title"].ToString()
            }
                ).ToList <Firm>()
                );
        }
Exemplo n.º 4
0
        private void INIT()
        {
            DataTable     dt = null;
            StringBuilder sb = new StringBuilder();

            sb.Append("select innertel, title from EXCEPTIONS order by innertel asc");

            using (FirebirdDBHelper db = new FirebirdDBHelper(sb.ToString(), util.strDBConn))
            {
                try
                {
                    dt = db.GetDataTable();
                }
                catch (FirebirdSql.Data.FirebirdClient.FbException fex)
                {
                    util.WriteLog(string.Format("{0} INIT ERR : {1}", this.GetType(), fex.Message));
                    return;
                }
            }

            _list = new ObservableCollection <BILLException>(
                (from _row in dt.AsEnumerable()
                 select new BILLException()
            {
                innertel = _row[0].ToString()
                , title = _row[1].ToString()
            }
                ).ToList <BILLException>()
                );
        }
Exemplo n.º 5
0
        private void INIT()
        {
            DataTable     dt = null;
            StringBuilder sb = new StringBuilder();

            sb.Append("select idx, areacode, nation_num, nation_local_num, natione, nationk, lm from INTERNATIONAL order by nationk asc");

            using (FirebirdDBHelper db = new FirebirdDBHelper(sb.ToString(), util.strDBConn))
            {
                try
                {
                    dt = db.GetDataTable();
                }
                catch (FirebirdSql.Data.FirebirdClient.FbException fex)
                {
                    util.WriteLog(string.Format("{0} INIT ERR : {1}", this.GetType(), fex.Message));
                    return;
                }
            }

            _list = new ObservableCollection <INTERNATIONAL>(
                (from _row in dt.AsEnumerable()
                 select new INTERNATIONAL()
            {
                idx = long.Parse(_row["idx"].ToString())
                ,
                areacode = int.Parse(_row["areacode"].ToString())
                ,
                nation_num = _row["nation_num"].ToString()
                ,
                nation_local_num = _row["nation_local_num"].ToString()
                ,
                natione = _row["natione"].ToString()
                ,
                nationk = _row["nationk"].ToString()
                ,
                lm = _row["lm"].ToString()
            }
                ).ToList <INTERNATIONAL>()
                );
        }
Exemplo n.º 6
0
        private void INIT()
        {
            DataTable     dt = null;
            StringBuilder sb = new StringBuilder();

            sb.Append("select areacode, lrate, lsec, mrate, msec from INTERNATIONAL_RATE order by areacode asc");

            using (FirebirdDBHelper db = new FirebirdDBHelper(sb.ToString(), util.strDBConn))
            {
                try
                {
                    dt = db.GetDataTable();
                }
                catch (FirebirdSql.Data.FirebirdClient.FbException fex)
                {
                    util.WriteLog(string.Format("{0} INIT ERR : {1}", this.GetType(), fex.Message));
                    return;
                }
            }

            _list = new ObservableCollection <INTERNATIONALRATE>(
                (from _row in dt.AsEnumerable()
                 select new INTERNATIONALRATE()
            {
                areacode = int.Parse(_row["areacode"].ToString())
                ,
                lrate = double.Parse(_row["lrate"].ToString())
                ,
                lsec = int.Parse(_row["lsec"].ToString())
                ,
                mrate = double.Parse(_row["mrate"].ToString())
                ,
                msec = int.Parse(_row["msec"].ToString())
            }
                ).ToList <INTERNATIONALRATE>()
                );
        }