Esempio n. 1
0
        public C_SERIES GetDetailById(OleExec sfcdb, string seriesid)
        {
            string       sql        = null;
            DataTable    dt         = null;
            Row_C_SERIES r_c_series = null;

            if (DBType == DB_TYPE_ENUM.Oracle)
            {
                if (seriesid.Length > 0)
                {
                    sql = $@"select * from {TableName} where id='{seriesid.Replace("'", "''")}' ";
                    dt  = sfcdb.ExecSelect(sql).Tables[0];
                    if (dt.Rows.Count == 0)
                    {
                        return(null);
                    }

                    r_c_series = (Row_C_SERIES)this.NewRow();
                    r_c_series.loadData(dt.Rows[0]);
                    return(r_c_series == null ? null : r_c_series.GetDataObject());
                }
                return(null);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 2
0
        public bool isExist(OleExec sfcdb, string seriesName, string custid)
        {
            string       sql        = null;
            DataTable    dt         = null;
            Row_C_SERIES r_c_series = null;

            if (DBType == DB_TYPE_ENUM.Oracle)
            {
                sql = $@"select * from {TableName} where customer_id='{custid.Replace("'", "''")}' and series_name='{seriesName.Replace("'","''")}' ";
                dt  = sfcdb.ExecSelect(sql).Tables[0];
                if (dt.Rows.Count == 0)
                {
                    return(false);
                }
                else
                {
                    return(true);
                }
            }
            else
            {
                throw new Exception();
            }
        }