Exemple #1
0
        public void Remove(InnerTel _itel)
        {
            DataTable dt = util.CreateDT2SP();
            dt.Rows.Add("@seq", _itel.Seq);

            using (FirebirdDBHelper db = new FirebirdDBHelper(util.strFBDBConn2))
            {
                try
                {
                    db.BeginTran();
                    db.ExcuteSP("RMV_INNERTELS", dt);
                    db.Commit();

                    InnerTel __obj = _list.FirstOrDefault(x => x.Seq == _itel.Seq);
                    _list.Remove(__obj);
                }
                catch (FirebirdSql.Data.FirebirdClient.FbException fe)
                {
                    db.Rollback();
                }
            }
        }
Exemple #2
0
        public void Add(InnerTel _itel)
        {
            DataTable dt = util.CreateDT2SP();
            dt.Rows.Add("@telnum", _itel.Telnum);
            dt.Rows.Add("@tellername", _itel.TellerName);

            using (FirebirdDBHelper db = new FirebirdDBHelper(util.strFBDBConn2))
            {
                try
                {
                    db.BeginTran();
                    db.ExcuteSP("INS_INNERTELS", dt);
                    db.Commit();

                    _list.Add(_itel);
                }
                catch (FirebirdSql.Data.FirebirdClient.FbException fe)
                {
                    db.Rollback();
                }
            }
        }
Exemple #3
0
        public void Modify(InnerTel _itel)
        {
            DataTable dt = util.CreateDT2SP();
            dt.Rows.Add("@seq", _itel.Seq);
            dt.Rows.Add("@telnum", _itel.Telnum);
            dt.Rows.Add("@tellername", _itel.TellerName);

            using (FirebirdDBHelper db = new FirebirdDBHelper(util.strFBDBConn2))
            {
                try
                {
                    db.BeginTran();
                    db.ExcuteSP("UDT_INNERTELS", dt);
                    db.Commit();

                    InnerTel __obj = _list.FirstOrDefault(x => x.Telnum == _itel.Telnum);
                    __obj.TellerName = _itel.TellerName;
                }
                catch (FirebirdSql.Data.FirebirdClient.FbException fe)
                {
                    db.Rollback();
                }
            }
        }