コード例 #1
0
        public static SqlDataReader ReaderSelect(DPassRecodeData d)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append("select * from DPassRecode ");
            return(WFNetLib.ADO.SQLServerOP.ReaderExecuteSQL(sql.ToString()));
        }
コード例 #2
0
        public static DPassRecodeData Construct(DataRow dr)
        {
            DPassRecodeData data = new DPassRecodeData();

            try { data.Dealer = Convert.ToString(dr["Dealer"]); }
            catch { }

            try { data.DPass = Convert.ToString(dr["DPass"]); }
            catch { }

            return(data);
        }
コード例 #3
0
        public static int Insert(DPassRecodeData d)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append("insert into DPassRecode (");
            sql.Append("Dealer, ");
            sql.Append("DPass");
            sql.Append(") values (");
            sql.Append("'");
            sql.Append(d.Dealer.ToString());
            sql.Append("'");
            sql.Append(", ");
            sql.Append("'");
            sql.Append(d.DPass.ToString());
            sql.Append("'");
            sql.Append(")");
            return(WFNetLib.ADO.SQLServerOP.NonQuerySQL(sql.ToString()));
        }
コード例 #4
0
        public static DPassRecodeData Construct(DataTable dt, int rowIndex)
        {
            DPassRecodeData data = new DPassRecodeData();

            if (dt.Rows.Count < rowIndex + 1)
            {
                return(null);
            }

            DataRow dr = dt.Rows[rowIndex];

            if (dr == null)
            {
                return(null);
            }

            try { data.Dealer = Convert.ToString(dr["Dealer"]); }
            catch { }

            try { data.DPass = Convert.ToString(dr["DPass"]); }
            catch { }

            return(data);
        }