private static ShowPlan GetShowPlanByDataRow(DataRow row)
 {
     ShowPlan showPlan = new ShowPlan();
     showPlan.PID = Convert.ToInt32(row["pID"].ToString());
     showPlan.PName = (string)row["pName"].ToString();
     showPlan.PDesc = (string)row["pDesc"].ToString();
     showPlan.PBegin = Convert.ToDateTime(row["pBegin"].ToString());
     showPlan.PEnd = Convert.ToDateTime(row["pEnd"].ToString());
     showPlan.PInTime = Convert.ToDateTime(row["pInTime"].ToString());
     showPlan.IsPlay = Convert.ToInt32(row["IsPlay"]);
     return showPlan;
 }
        /// <summary>
        /// 新增计划
        /// </summary>
        /// <param name="showPlan">展示计划对象</param>
        /// <returns>受影响的行数</returns>
        public static int AddShowPlan(ShowPlan showPlan)
        {
            string sql = "INSERT INTO showPlan(pName,pDesc,pBegin,pEnd) value(@pName,@pDesc,@pBegin,@pEnd)";
            SqlParameter[] par = new SqlParameter[]
            {
                new SqlParameter("@pName",showPlan.PName),
                new SqlParameter("@pDesc",showPlan.PDesc),
                new SqlParameter("@pBegin",showPlan.PBegin),
                new SqlParameter("@pEnd",showPlan.PEnd)
            };

            return DBHelper.GetScalar(sql,par);
        }