Beispiel #1
0
        public static SqlDataReader ReaderSelect(ExDataData d)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append("select * from ExData ");
            return(WFNetLib.ADO.SQLServerOP.ReaderExecuteSQL(sql.ToString()));
        }
Beispiel #2
0
        public static ExDataData Construct(DataTable dt, int rowIndex)
        {
            ExDataData data = new ExDataData();

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

            DataRow dr = dt.Rows[rowIndex];

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

            try { data.ExID = Convert.ToInt32(dr["ExID"]); }
            catch { }

            try { data.DataTime = Convert.ToDateTime(dr["DataTime"]); }
            catch { }

            try { data.AI01 = Convert.ToDouble(dr["AI01"]); }
            catch { }

            try { data.AI02 = Convert.ToDouble(dr["AI02"]); }
            catch { }

            try { data.AI03 = Convert.ToDouble(dr["AI03"]); }
            catch { }

            try { data.AI04 = Convert.ToDouble(dr["AI04"]); }
            catch { }

            try { data.AI05 = Convert.ToDouble(dr["AI05"]); }
            catch { }

            try { data.AI06 = Convert.ToDouble(dr["AI06"]); }
            catch { }

            try { data.AI07 = Convert.ToDouble(dr["AI07"]); }
            catch { }

            try { data.AI08 = Convert.ToDouble(dr["AI08"]); }
            catch { }

            try { data.AI09 = Convert.ToDouble(dr["AI09"]); }
            catch { }

            try { data.AI10 = Convert.ToDouble(dr["AI10"]); }
            catch { }

            try { data.AI11 = Convert.ToDouble(dr["AI11"]); }
            catch { }

            try { data.AI12 = Convert.ToDouble(dr["AI12"]); }
            catch { }

            try { data.AI13 = Convert.ToDouble(dr["AI13"]); }
            catch { }

            try { data.AI14 = Convert.ToDouble(dr["AI14"]); }
            catch { }

            try { data.AI15 = Convert.ToDouble(dr["AI15"]); }
            catch { }

            try { data.AI16 = Convert.ToDouble(dr["AI16"]); }
            catch { }

            try { data.AI17 = Convert.ToDouble(dr["AI17"]); }
            catch { }

            try { data.AI18 = Convert.ToDouble(dr["AI18"]); }
            catch { }

            try { data.AI19 = Convert.ToDouble(dr["AI19"]); }
            catch { }

            try { data.AI20 = Convert.ToDouble(dr["AI20"]); }
            catch { }

            try { data.AI21 = Convert.ToDouble(dr["AI21"]); }
            catch { }

            try { data.AI22 = Convert.ToDouble(dr["AI22"]); }
            catch { }

            try { data.AI23 = Convert.ToDouble(dr["AI23"]); }
            catch { }

            try { data.AI24 = Convert.ToDouble(dr["AI24"]); }
            catch { }

            try { data.AI25 = Convert.ToDouble(dr["AI25"]); }
            catch { }

            try { data.AI26 = Convert.ToDouble(dr["AI26"]); }
            catch { }

            try { data.AI27 = Convert.ToDouble(dr["AI27"]); }
            catch { }

            try { data.AI28 = Convert.ToDouble(dr["AI28"]); }
            catch { }

            try { data.AI29 = Convert.ToDouble(dr["AI29"]); }
            catch { }

            try { data.AI30 = Convert.ToDouble(dr["AI30"]); }
            catch { }

            try { data.AI31 = Convert.ToDouble(dr["AI31"]); }
            catch { }

            try { data.AI32 = Convert.ToDouble(dr["AI32"]); }
            catch { }

            try { data.AI33 = Convert.ToDouble(dr["AI33"]); }
            catch { }

            try { data.AI34 = Convert.ToDouble(dr["AI34"]); }
            catch { }

            try { data.AI35 = Convert.ToDouble(dr["AI35"]); }
            catch { }

            try { data.AI36 = Convert.ToDouble(dr["AI36"]); }
            catch { }

            try { data.AI37 = Convert.ToDouble(dr["AI37"]); }
            catch { }

            try { data.AI38 = Convert.ToDouble(dr["AI38"]); }
            catch { }

            try { data.AI39 = Convert.ToDouble(dr["AI39"]); }
            catch { }

            try { data.AI40 = Convert.ToDouble(dr["AI40"]); }
            catch { }

            try { data.AI41 = Convert.ToDouble(dr["AI41"]); }
            catch { }

            try { data.AI42 = Convert.ToDouble(dr["AI42"]); }
            catch { }

            try { data.AI43 = Convert.ToDouble(dr["AI43"]); }
            catch { }

            try { data.AI44 = Convert.ToDouble(dr["AI44"]); }
            catch { }

            try { data.AI45 = Convert.ToDouble(dr["AI45"]); }
            catch { }

            try { data.AI46 = Convert.ToDouble(dr["AI46"]); }
            catch { }

            try { data.AI47 = Convert.ToDouble(dr["AI47"]); }
            catch { }

            try { data.AI48 = Convert.ToDouble(dr["AI48"]); }
            catch { }

            try { data.AI49 = Convert.ToDouble(dr["AI49"]); }
            catch { }

            try { data.AI50 = Convert.ToDouble(dr["AI50"]); }
            catch { }

            try { data.AI51 = Convert.ToDouble(dr["AI51"]); }
            catch { }

            try { data.AI52 = Convert.ToDouble(dr["AI52"]); }
            catch { }

            try { data.AI53 = Convert.ToDouble(dr["AI53"]); }
            catch { }

            try { data.AI54 = Convert.ToDouble(dr["AI54"]); }
            catch { }

            try { data.AI55 = Convert.ToDouble(dr["AI55"]); }
            catch { }

            try { data.AI56 = Convert.ToDouble(dr["AI56"]); }
            catch { }

            try { data.AI57 = Convert.ToDouble(dr["AI57"]); }
            catch { }

            try { data.AI58 = Convert.ToDouble(dr["AI58"]); }
            catch { }

            try { data.AI59 = Convert.ToDouble(dr["AI59"]); }
            catch { }

            try { data.AI60 = Convert.ToDouble(dr["AI60"]); }
            catch { }

            try { data.AI61 = Convert.ToDouble(dr["AI61"]); }
            catch { }

            try { data.AI62 = Convert.ToDouble(dr["AI62"]); }
            catch { }

            try { data.AI63 = Convert.ToDouble(dr["AI63"]); }
            catch { }

            try { data.AI64 = Convert.ToDouble(dr["AI64"]); }
            catch { }

            return(data);
        }
Beispiel #3
0
        public static ExDataData Construct(IDataReader reader)
        {
            ExDataData data = new ExDataData();

            try { data.ExID = Convert.ToInt32(reader["ExID"]); }
            catch { }

            try { data.DataTime = Convert.ToDateTime(reader["DataTime"]); }
            catch { }

            try { data.AI01 = Convert.ToDouble(reader["AI01"]); }
            catch { }

            try { data.AI02 = Convert.ToDouble(reader["AI02"]); }
            catch { }

            try { data.AI03 = Convert.ToDouble(reader["AI03"]); }
            catch { }

            try { data.AI04 = Convert.ToDouble(reader["AI04"]); }
            catch { }

            try { data.AI05 = Convert.ToDouble(reader["AI05"]); }
            catch { }

            try { data.AI06 = Convert.ToDouble(reader["AI06"]); }
            catch { }

            try { data.AI07 = Convert.ToDouble(reader["AI07"]); }
            catch { }

            try { data.AI08 = Convert.ToDouble(reader["AI08"]); }
            catch { }

            try { data.AI09 = Convert.ToDouble(reader["AI09"]); }
            catch { }

            try { data.AI10 = Convert.ToDouble(reader["AI10"]); }
            catch { }

            try { data.AI11 = Convert.ToDouble(reader["AI11"]); }
            catch { }

            try { data.AI12 = Convert.ToDouble(reader["AI12"]); }
            catch { }

            try { data.AI13 = Convert.ToDouble(reader["AI13"]); }
            catch { }

            try { data.AI14 = Convert.ToDouble(reader["AI14"]); }
            catch { }

            try { data.AI15 = Convert.ToDouble(reader["AI15"]); }
            catch { }

            try { data.AI16 = Convert.ToDouble(reader["AI16"]); }
            catch { }

            try { data.AI17 = Convert.ToDouble(reader["AI17"]); }
            catch { }

            try { data.AI18 = Convert.ToDouble(reader["AI18"]); }
            catch { }

            try { data.AI19 = Convert.ToDouble(reader["AI19"]); }
            catch { }

            try { data.AI20 = Convert.ToDouble(reader["AI20"]); }
            catch { }

            try { data.AI21 = Convert.ToDouble(reader["AI21"]); }
            catch { }

            try { data.AI22 = Convert.ToDouble(reader["AI22"]); }
            catch { }

            try { data.AI23 = Convert.ToDouble(reader["AI23"]); }
            catch { }

            try { data.AI24 = Convert.ToDouble(reader["AI24"]); }
            catch { }

            try { data.AI25 = Convert.ToDouble(reader["AI25"]); }
            catch { }

            try { data.AI26 = Convert.ToDouble(reader["AI26"]); }
            catch { }

            try { data.AI27 = Convert.ToDouble(reader["AI27"]); }
            catch { }

            try { data.AI28 = Convert.ToDouble(reader["AI28"]); }
            catch { }

            try { data.AI29 = Convert.ToDouble(reader["AI29"]); }
            catch { }

            try { data.AI30 = Convert.ToDouble(reader["AI30"]); }
            catch { }

            try { data.AI31 = Convert.ToDouble(reader["AI31"]); }
            catch { }

            try { data.AI32 = Convert.ToDouble(reader["AI32"]); }
            catch { }

            try { data.AI33 = Convert.ToDouble(reader["AI33"]); }
            catch { }

            try { data.AI34 = Convert.ToDouble(reader["AI34"]); }
            catch { }

            try { data.AI35 = Convert.ToDouble(reader["AI35"]); }
            catch { }

            try { data.AI36 = Convert.ToDouble(reader["AI36"]); }
            catch { }

            try { data.AI37 = Convert.ToDouble(reader["AI37"]); }
            catch { }

            try { data.AI38 = Convert.ToDouble(reader["AI38"]); }
            catch { }

            try { data.AI39 = Convert.ToDouble(reader["AI39"]); }
            catch { }

            try { data.AI40 = Convert.ToDouble(reader["AI40"]); }
            catch { }

            try { data.AI41 = Convert.ToDouble(reader["AI41"]); }
            catch { }

            try { data.AI42 = Convert.ToDouble(reader["AI42"]); }
            catch { }

            try { data.AI43 = Convert.ToDouble(reader["AI43"]); }
            catch { }

            try { data.AI44 = Convert.ToDouble(reader["AI44"]); }
            catch { }

            try { data.AI45 = Convert.ToDouble(reader["AI45"]); }
            catch { }

            try { data.AI46 = Convert.ToDouble(reader["AI46"]); }
            catch { }

            try { data.AI47 = Convert.ToDouble(reader["AI47"]); }
            catch { }

            try { data.AI48 = Convert.ToDouble(reader["AI48"]); }
            catch { }

            try { data.AI49 = Convert.ToDouble(reader["AI49"]); }
            catch { }

            try { data.AI50 = Convert.ToDouble(reader["AI50"]); }
            catch { }

            try { data.AI51 = Convert.ToDouble(reader["AI51"]); }
            catch { }

            try { data.AI52 = Convert.ToDouble(reader["AI52"]); }
            catch { }

            try { data.AI53 = Convert.ToDouble(reader["AI53"]); }
            catch { }

            try { data.AI54 = Convert.ToDouble(reader["AI54"]); }
            catch { }

            try { data.AI55 = Convert.ToDouble(reader["AI55"]); }
            catch { }

            try { data.AI56 = Convert.ToDouble(reader["AI56"]); }
            catch { }

            try { data.AI57 = Convert.ToDouble(reader["AI57"]); }
            catch { }

            try { data.AI58 = Convert.ToDouble(reader["AI58"]); }
            catch { }

            try { data.AI59 = Convert.ToDouble(reader["AI59"]); }
            catch { }

            try { data.AI60 = Convert.ToDouble(reader["AI60"]); }
            catch { }

            try { data.AI61 = Convert.ToDouble(reader["AI61"]); }
            catch { }

            try { data.AI62 = Convert.ToDouble(reader["AI62"]); }
            catch { }

            try { data.AI63 = Convert.ToDouble(reader["AI63"]); }
            catch { }

            try { data.AI64 = Convert.ToDouble(reader["AI64"]); }
            catch { }

            return(data);
        }
Beispiel #4
0
        public static int Insert(ExDataData d)
        {
            StringBuilder sql = new StringBuilder();

            sql.Append("insert into ExData (");
            sql.Append("ExID, ");
            sql.Append("DataTime, ");
            sql.Append("AI01, ");
            sql.Append("AI02, ");
            sql.Append("AI03, ");
            sql.Append("AI04, ");
            sql.Append("AI05, ");
            sql.Append("AI06, ");
            sql.Append("AI07, ");
            sql.Append("AI08, ");
            sql.Append("AI09, ");
            sql.Append("AI10, ");
            sql.Append("AI11, ");
            sql.Append("AI12, ");
            sql.Append("AI13, ");
            sql.Append("AI14, ");
            sql.Append("AI15, ");
            sql.Append("AI16, ");
            sql.Append("AI17, ");
            sql.Append("AI18, ");
            sql.Append("AI19, ");
            sql.Append("AI20, ");
            sql.Append("AI21, ");
            sql.Append("AI22, ");
            sql.Append("AI23, ");
            sql.Append("AI24, ");
            sql.Append("AI25, ");
            sql.Append("AI26, ");
            sql.Append("AI27, ");
            sql.Append("AI28, ");
            sql.Append("AI29, ");
            sql.Append("AI30, ");
            sql.Append("AI31, ");
            sql.Append("AI32, ");
            sql.Append("AI33, ");
            sql.Append("AI34, ");
            sql.Append("AI35, ");
            sql.Append("AI36, ");
            sql.Append("AI37, ");
            sql.Append("AI38, ");
            sql.Append("AI39, ");
            sql.Append("AI40, ");
            sql.Append("AI41, ");
            sql.Append("AI42, ");
            sql.Append("AI43, ");
            sql.Append("AI44, ");
            sql.Append("AI45, ");
            sql.Append("AI46, ");
            sql.Append("AI47, ");
            sql.Append("AI48, ");
            sql.Append("AI49, ");
            sql.Append("AI50, ");
            sql.Append("AI51, ");
            sql.Append("AI52, ");
            sql.Append("AI53, ");
            sql.Append("AI54, ");
            sql.Append("AI55, ");
            sql.Append("AI56, ");
            sql.Append("AI57, ");
            sql.Append("AI58, ");
            sql.Append("AI59, ");
            sql.Append("AI60, ");
            sql.Append("AI61, ");
            sql.Append("AI62, ");
            sql.Append("AI63, ");
            sql.Append("AI64");
            sql.Append(") values (");
            sql.Append("");
            sql.Append(d.ExID.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("'");
            sql.Append(d.DataTime.ToString("yyyy-MM-dd HH:mm:ss"));
            sql.Append("'");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI01.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI02.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI03.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI04.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI05.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI06.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI07.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI08.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI09.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI10.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI11.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI12.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI13.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI14.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI15.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI16.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI17.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI18.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI19.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI20.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI21.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI22.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI23.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI24.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI25.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI26.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI27.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI28.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI29.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI30.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI31.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI32.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI33.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI34.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI35.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI36.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI37.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI38.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI39.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI40.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI41.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI42.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI43.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI44.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI45.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI46.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI47.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI48.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI49.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI50.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI51.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI52.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI53.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI54.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI55.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI56.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI57.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI58.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI59.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI60.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI61.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI62.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI63.ToString());
            sql.Append("");
            sql.Append(", ");
            sql.Append("");
            sql.Append(d.AI64.ToString());
            sql.Append("");
            sql.Append(")");
            return(WFNetLib.ADO.SQLServerOP.NonQuerySQL(sql.ToString()));
        }