static void ActInsert(act parm)
        {
//            string sql = @"insert into T_CP_ACT (ID,ACTID,ACTNAME,FILENUMBER,CONTENT,PUBDATE,STADATE,DEPTS,CREATEDTIME,EFFECT,ACTCODE,DEPTIDS,SRCTYPE,STATUS,DELFLAG,UPDATETIME,ENDDATE)
//                                        values (:ID,:ACTID,:ACTNAME,:FILENUMBER,:CONTENT,:PUBDATE,:STADATE,:DEPTS,:CREATEDTIME,:EFFECT,:ACTCODE,:DEPTIDS,:SRCTYPE,:STATUS,:DELFLAG,:UPDATETIME,:ENDDATE)";
//            //:ID,:ACTID,:ACTNAME,:FILENUMBER,:CONTENT,:PUBDATE,:STADATE,:DEPTS,:CREATEDTIME,:EFFECT,:ACTCODE,:DEPTIDS,:SRCTYPE,:STATUS,:DELFLAG,:UPDATETIME,:ENDDATE
//            OracleParameter[] parms ={
//                                   new OracleParameter(":ID",OracleType.Number,32,parm.actid),
//                                   new OracleParameter(":ACTID",OracleType.Number,32,parm.actid),
//                                   new OracleParameter(":ACTNAME",parm.actname),
//                                   new OracleParameter(":FILENUMBER",parm.fileNumber),
//                                   new OracleParameter(":CONTENT",parm.content),
//                                   new OracleParameter(":PUBDATE", Convert.ToDateTime(parm.pubdate)),//有问题
//                                   new OracleParameter(":STADATE",Convert.ToDateTime(parm.stadate)),//有问题
//                                   new OracleParameter(":DEPTS",parm.depts),
//                                   new OracleParameter(":CREATEDTIME",DateTime.Now),
//                                   new OracleParameter(":EFFECT",parm.effect),
//                                   new OracleParameter(":ACTCODE",""),
//                                   new OracleParameter(":DEPTIDS",parm.deptids),
//                                   new OracleParameter(":SRCTYPE","1"),
//                                   new OracleParameter(":STATUS","1"),
//                                   new OracleParameter(":DELFLAG","N"),//如果是"Y"呢?
//                                   new OracleParameter(":UPDATETIME",DateTime.Now),
//                                   new OracleParameter(":ENDDATE",parm.enddate==null?DateTime.MinValue:Convert.ToDateTime(parm.enddate))
//                                    };
//            DBHelper.ExecuteNonQuery(sql, System.Data.CommandType.Text, parms);

            //  string sql = "INSERT INTO T_CP_ACT (ID,ACTID,ACTNAME,FILENUMBER,CONTENT,PUBDATE,STADATE,DEPTS,CREATEDTIME,EFFECT,ACTCODE,DEPTIDS,SRCTYPE,STATUS,DELFLAG,UPDATETIME,ENDDATE) VALUES (" + parm.actid + "," + parm.actid + ",'" + parm.actname + "','" + parm.fileNumber + "','" + parm.content + "','" + parm.pubdate + "','" + parm.stadate + "','" + parm.depts + "','" + DateTime.Now.ToString("yyyy/MM/dd") + "'," + parm.effect + ",1,'" + parm.deptids + "',1,1,'N','" + DateTime.Now.ToString("yyyy/MM/dd") + "','"+parm.enddate+"')";
            //  DBHelper.ExecuteNonQuery(sql);
            T_CP_ACT act = new T_CP_ACT()
            {
                ID          = Convert.ToInt32(parm.actid),
                ACTCODE     = "",
                ACTID       = Convert.ToInt32(parm.actid),
                ACTNAME     = parm.actname,
                CONTENT     = parm.content,
                CREATEDTIME = DateTime.Now,
                CREATOR     = "",
                DELFLAG     = "N",
                DEPTIDS     = parm.deptids,
                DEPTS       = parm.depts,
                EFFECT      = parm.effect,
                FILENUMBER  = parm.fileNumber,
                SRCTYPE     = "1",
                STATUS      = "1",
                UPDATETIME  = DateTime.Now,
                UPDATOR     = "",
                STADATE     = DateTime.MinValue,
                PUBDATE     = DateTime.MinValue,
                ENDDATE     = DateTime.MinValue
            };

            if (parm.pubdate != null && parm.pubdate != string.Empty)
            {
                act.PUBDATE = Convert.ToDateTime(parm.pubdate);
            }

            if (parm.stadate != null && parm.stadate != string.Empty)
            {
                act.STADATE = Convert.ToDateTime(parm.stadate);
            }
            if (parm.enddate != null && parm.enddate != string.Empty)
            {
                act.ENDDATE = Convert.ToDateTime(parm.enddate);
            }
            act.Add(act);
            Console.WriteLine("Act Inserted " + act.ACTID);
        }
 public root()
 {
     act = new act();
 }