Пример #1
0
        public static int DeleteTbl_PlanManage(int ID)
        {
            Tbl_PlanManage tbl_planmanage = GetTbl_PlanManageById(ID);

            WebCommon.Public.WriteLog("删除计划进度");
            return(new Tbl_PlanManageService().DeleteTbl_PlanManageById(ID));
        }
Пример #2
0
        /// <summary>
        ///根据Sql语句返回集合
        /// </summary>
        private IList <Tbl_PlanManage> getTbl_PlanManagesBySql(string Sql)
        {
            IList <Tbl_PlanManage> list = new List <Tbl_PlanManage>();
            DataSet ds = DBHelper.ExecuteDataset(this.connection, CommandType.Text, Sql);

            if (ds.Tables.Count > 0)
            {
                DataTable dt = ds.Tables[0];
                foreach (DataRow dr in dt.Rows)
                {
                    Tbl_PlanManage tbl_planmanage = new Tbl_PlanManage();
                    tbl_planmanage.ID          = Convert.ToInt32(dr["ID"]);
                    tbl_planmanage.PlanDate    = Convert.ToString(dr["PlanDate"]);
                    tbl_planmanage.PlanContent = Convert.ToString(dr["PlanContent"]);
                    tbl_planmanage.NodeUser    = Convert.ToString(dr["NodeUser"]);
                    tbl_planmanage.Status      = Convert.ToString(dr["Status"]);
                    tbl_planmanage.DealUser    = Convert.ToString(dr["DealUser"]);
                    tbl_planmanage.DealFlag    = Convert.ToInt32(dr["DealFlag"]);
                    tbl_planmanage.DealTime    = Convert.ToDateTime(dr["DealTime"]);
                    tbl_planmanage.AddDate     = Convert.ToDateTime(dr["AddDate"]);
                    list.Add(tbl_planmanage);
                }
            }
            return(list);
        }
Пример #3
0
        public int AddTbl_PlanManage(Tbl_PlanManage tbl_planmanage)
        {
            string Sql = "insert into [Tbl_PlanManage] ([PlanDate],[PlanContent],[NodeUser],[Status],[DealUser],[DealFlag],[DealTime],[AddDate]) values (@PlanDate,@PlanContent,@NodeUser,@Status,@DealUser,@DealFlag,@DealTime,@AddDate)";

            SqlParameter[] sp = new SqlParameter[]
            {
                new SqlParameter("@PlanDate", tbl_planmanage.PlanDate),
                new SqlParameter("@PlanContent", tbl_planmanage.PlanContent),
                new SqlParameter("@NodeUser", tbl_planmanage.NodeUser),
                new SqlParameter("@Status", tbl_planmanage.Status),
                new SqlParameter("@DealUser", tbl_planmanage.DealUser),
                new SqlParameter("@DealFlag", tbl_planmanage.DealFlag),
                new SqlParameter("@DealTime", tbl_planmanage.DealTime),
                new SqlParameter("@AddDate", tbl_planmanage.AddDate)
            };
            return(DBHelper.ExecuteNonQuery(this.connection, CommandType.Text, Sql, sp));
        }
Пример #4
0
        public int UpdateTbl_PlanManageById(Tbl_PlanManage tbl_planmanage)
        {
            string Sql = "update [Tbl_PlanManage] set [PlanDate]=@PlanDate,[PlanContent]=@PlanContent,[NodeUser]=@NodeUser,[Status]=@Status,[DealUser]=@DealUser,[DealFlag]=@DealFlag,[DealTime]=@DealTime,[AddDate]=@AddDate where [ID]=@ID";

            SqlParameter[] sp = new SqlParameter[]
            {
                new SqlParameter("@PlanDate", tbl_planmanage.PlanDate),
                new SqlParameter("@PlanContent", tbl_planmanage.PlanContent),
                new SqlParameter("@NodeUser", tbl_planmanage.NodeUser),
                new SqlParameter("@Status", tbl_planmanage.Status),
                new SqlParameter("@DealUser", tbl_planmanage.DealUser),
                new SqlParameter("@DealFlag", tbl_planmanage.DealFlag),
                new SqlParameter("@DealTime", tbl_planmanage.DealTime),
                new SqlParameter("@AddDate", tbl_planmanage.AddDate),
                new SqlParameter("@ID", tbl_planmanage.ID)
            };
            return(DBHelper.ExecuteNonQuery(this.connection, CommandType.Text, Sql, sp));
        }
Пример #5
0
 public static int UpdateTbl_PlanManage(Tbl_PlanManage tbl_planmanage)
 {
     WebCommon.Public.WriteLog("修改计划进度");
     return(new Tbl_PlanManageService().UpdateTbl_PlanManageById(tbl_planmanage));
 }
Пример #6
0
 public static int AddTbl_PlanManage(Tbl_PlanManage tbl_planmanage)
 {
     WebCommon.Public.WriteLog("添加计划进度");
     return(new Tbl_PlanManageService().AddTbl_PlanManage(tbl_planmanage));
 }