예제 #1
0
파일: ad_main.cs 프로젝트: kuangzhongwei/ad
 public static int admin_up_team_id(T_ad_team model)
 {
     return a.data.mssql.ExecuteNonQuery(1, "[p-sys-up-team-id]", new SqlParameter[]{
          new SqlParameter("@id",model.Id),
          new SqlParameter("@team_name",model.Team_name),
          new SqlParameter("@post_job",model.Post_job),
          new SqlParameter("@post_summary",model.Post_summary),
          new SqlParameter("@post_info",model.Post_info),
          new SqlParameter("@post_img",model.Post_img),
          new SqlParameter("@post_num",model.Post_num)
     });
 }
예제 #2
0
파일: ad_main.cs 프로젝트: kuangzhongwei/ad
 public static T_ad_team admin_select_team_id(int id)
 {
     using (SqlDataReader dr = a.data.mssql.ExecuteReader(1, "[p-sys-team-id]", new SqlParameter[] { new SqlParameter("@id", id) }))
     {
         T_ad_team model = null;
         while (dr.Read())
         {
             model = new T_ad_team();
             model.Id = a.normal.toInt(dr["id"]);
             model.Post_img = a.normal.toString(dr["post_img"]);
             model.Post_info = a.normal.toString(dr["post_info"]);
             model.Post_job = a.normal.toString(dr["post_job"]);
             model.Post_num = a.normal.toInt(dr["post_num"]);
             model.Post_summary = a.normal.toString(dr["Post_summary"]);
             model.Post_time = a.normal.toDateTime(dr["post_time"]);
             model.Team_name = a.normal.toString(dr["team_name"]);
         }
         dr.Close();
         dr.Dispose();
         return model;
     }
 }
예제 #3
0
파일: ad_main.cs 프로젝트: kuangzhongwei/ad
 public static List<T_ad_team> admin_select_team(string tblName, string fldName, int PageSize, int PageIndex, string OrderType, string strWhere, out int Count)
 {
     SqlParameter[] parameters = {
             new SqlParameter("@tblName", SqlDbType.VarChar, 255),
             new SqlParameter("@strGetFields", SqlDbType.VarChar, 1000),
             new SqlParameter("@fldName", SqlDbType.VarChar, 255),
             new SqlParameter("@PageSize", SqlDbType.Int),
             new SqlParameter("@PageIndex", SqlDbType.Int),
             new SqlParameter("@strOrder", SqlDbType.VarChar,100),
             new SqlParameter("@strWhere", SqlDbType.VarChar,1500),
             new SqlParameter("@Count", SqlDbType.Int),
             };
     parameters[0].Value = tblName;
     parameters[1].Value = "*";
     parameters[2].Value = fldName;
     parameters[3].Value = PageSize;
     parameters[4].Value = PageIndex;
     parameters[5].Value = OrderType;
     parameters[6].Value = strWhere;
     parameters[7].Direction = ParameterDirection.Output;
     using (SqlDataReader dr = a.data.mssql.ExecuteReader(1, "[UP_PaginationAnyOrderCount]", parameters))
     {
         List<T_ad_team> list = new List<T_ad_team>();
         while (dr.Read())
         {
             T_ad_team model = new T_ad_team();
             model.Id = a.normal.toInt(dr["id"]);
             model.Post_img = a.normal.toString(dr["post_img"]);
             model.Post_info = a.normal.toString(dr["post_info"]);
             model.Post_job = a.normal.toString(dr["post_job"]);
             model.Post_num = a.normal.toInt(dr["post_num"]);
             model.Post_summary = a.normal.toString(dr["Post_summary"]);
             model.Post_time = a.normal.toDateTime(dr["post_time"]);
             model.Team_name = a.normal.toString(dr["team_name"]);
             list.Add(model);
         }
         dr.Close();
         dr.Dispose();
         Count = a.normal.toInt(parameters[7].Value);
         return list;
     }
 }
예제 #4
0
파일: ad_main.cs 프로젝트: kuangzhongwei/ad
 public static int admin_in_team(T_ad_team model)
 {
     return a.data.mssql.ExecuteNonQuery(1, "[p-sys-in-team]", new SqlParameter[]{
         new SqlParameter("@team_name",model.Team_name),
         new SqlParameter("@post_job",model.Post_job),
         new SqlParameter("@post_summary",model.Post_summary),
         new SqlParameter("@post_info",model.Post_info),
         new SqlParameter("@post_img",model.Post_img)
     });
 }
예제 #5
0
        protected void butsubmint_Click(object sender, EventArgs e)
        {
            T_ad_team model = new T_ad_team();
            model.Post_job = a.normal.toString(txtjob.Text.Trim());
            model.Team_name = a.normal.toString(txtname.Text.Trim());
            model.Post_info = content1.InnerHtml;
            if (img(File1).Equals(""))
            {
                MessShowBox.show("图片不能为空", this);
                return;
            }
            else
            {
                model.Post_img = img(File1);
            }
            model.Post_summary = str();

            if (ad_main.admin_in_team(model) > 0)
            {
                MessShowBox.show("添加成功", this);
                txtjob.Text = "";
                txtname.Text = "";
                content1.InnerHtml = "";
            }
            else
            {
                MessShowBox.show("网络链接错误,添加失败",this);
            }
        }
예제 #6
0
 protected void butsubmint_Click(object sender, EventArgs e)
 {
     T_ad_team model = new T_ad_team();
     model.Id = a.query.toInt("aid");
     if (File1.FileName == "")
     {
         model.Post_img = path;
     }
     else
     {
         if (path != "")
         {
             File.Delete(Server.MapPath(path));
         }
         model.Post_img = img(File1);
     }
     model.Post_info = a.normal.toString(content1.InnerHtml);
     model.Post_job = a.normal.toString(txtjob.Text.Trim());
     model.Post_num = a.normal.toInt(txtnum.Text.Trim());
     model.Post_summary = str();
     model.Team_name = a.normal.toString(txtname.Text.Trim());
     if (ad_main.admin_up_team_id(model) > 0)
     {
         txtname.Text = "";
         txtnum.Text = "";
         txtjob.Text = "";
         content1.InnerHtml = "";
         MessShowBox.show("修改成功", this);
         Response.Redirect("ad_team.aspx");
     }
     else
     {
         MessShowBox.show("网络链接错误,修改失败", this);
     }
 }