private void ShowInfo(int Id) { Navigation011.Para_Str = "id=" + Id; Maticsoft.BLL.NewsManage.News bll = new Maticsoft.BLL.NewsManage.News(); Maticsoft.Model.NewsManage.News model = bll.GetModel(Id); this.lblNewsId.Text = model.NewsId.ToString(); this.lblHeading.Text = model.Heading; this.lblFocus.Text = model.Focus; this.lblFrequency.Text = model.Frequency.ToString(); if (model.Dormancy == "True") { this.lblDormancy.Text = "ÐÝÃß"; } else { this.lblDormancy.Text = "·¢²¼"; } lblistop.Text = model.IsTop == 1 ? "ÊÇ" : "·ñ"; this.lblIssueDate.Text = model.IssueDate.ToString(); this.lblContent.Text = model.Content; Maticsoft.BLL.NewsManage.NewsClass bllc = new Maticsoft.BLL.NewsManage.NewsClass(); this.lblClass.Text = bllc.GetModel(model.ClassId).ClassDesc; }
protected void BindClassList(int ClassID) { string strWhere=""; Maticsoft.BLL.NewsManage.NewsClass bll = new Maticsoft.BLL.NewsManage.NewsClass(); Maticsoft.Model.NewsManage.NewsClass model = new Maticsoft.Model.NewsManage.NewsClass(); model = bll.GetModel(ClassID); int parentid = model.ParentId; if (parentid != 0) { model= bll.GetModelByCache(parentid); parentid = model.ParentId; } strWhere = "parentid="+model.ClassId; DataSet ds = new DataSet(); ds = bll.GetList(strWhere); DataTable dt = ds.Tables[0]; this.ClassName.InnerHtml = model.ClassDesc; if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { string classname="nav_2"; // Ñ¡ÖÐ״̬Ñùʽ if (ClassID.ToString() == dt.Rows[i][0].ToString()) classname = "nav_2_on"; this.ClassList.InnerHtml += "<li class='" + classname + "'><img src='images/picto_feuilles.gif' align='absmiddle' /><a href='main.aspx?classid=" + dt.Rows[i][0].ToString() + "' >" + dt.Rows[i][1].ToString() + "</a></li>"; } } }
protected void gridView_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { string Dormancy = (string)DataBinder.Eval(e.Row.DataItem, "Dormancy"); int ClassId = (int)DataBinder.Eval(e.Row.DataItem, "ClassId"); int IsTop = (int)DataBinder.Eval(e.Row.DataItem, "IsTop"); if (Dormancy.ToLower() == "true") { e.Row.Cells[3].Text = "<span style=\" color:Red\">休眠</span>"; } else { e.Row.Cells[3].Text = "<span style=\" color:Green\">发布</span>"; } if (IsTop == 1) { e.Row.Cells[4].Text = "<span style=\" color:Green\">是</span>"; } else { e.Row.Cells[4].Text = "<span style=\" color:Red\">否</span>"; } Maticsoft.BLL.NewsManage.NewsClass bll = new Maticsoft.BLL.NewsManage.NewsClass(); Maticsoft.Model.NewsManage.NewsClass mod = bll.GetModel(ClassId); if (mod != null) { e.Row.Cells[5].Text = mod.ClassDesc; } else { e.Row.Cells[5].Text = "未知类别"; } } }
private void ShowInfo(int Id) { Navigation011.Para_Str = "id=" + Id; Maticsoft.BLL.NewsManage.News bll = new Maticsoft.BLL.NewsManage.News(); Maticsoft.Model.NewsManage.News model = bll.GetModel(Id); this.lblNewsId.Text = model.NewsId.ToString(); this.lblHeading.Text = model.Heading; this.lblFocus.Text = model.Focus; this.lblFrequency.Text = model.Frequency.ToString(); if (model.Dormancy == "True") { this.lblDormancy.Text = "·¢²¼"; } else { this.lblDormancy.Text = "ÐÝÃß"; } lblistop.Text = model.IsTop == 1 ? "ÊÇ" : "·ñ"; this.lblIssueDate.Text = model.IssueDate.ToString(); this.lblContent.Text = model.Content; Maticsoft.BLL.NewsManage.NewsClass bllc = new Maticsoft.BLL.NewsManage.NewsClass(); this.lblClass.Text = bllc.GetModel(model.ClassId).ClassDesc; }
//#region BiudTree //private void BiudTree() //{ // // if(Session["UserInfo"]==null) // // { // // return ; // // } // // MoviePrincipal user=new MoviePrincipal(Context.User.Identity.Name); // // PowerWeb.Web.Accounts.CS.Bus.User currentUser=(PowerWeb.Web.Accounts.CS.Bus.User)Session["UserInfo"];00 // Maticsoft.BLL.NewsManage.NewsClass bll = new Maticsoft.BLL.NewsManage.NewsClass(); // DataTable dt; // // if(user.HasPermissionID(newsmanageid)) // // { // // dt=nc.GetNewsClassList("").Tables[0]; // // } // // else // // { // // dt=nc.GetNewsClassList(int.Parse(currentUser.DepartmentID)).Tables[0]; // dt = bll.GetList("").Tables[0]; // // } // this.dropParent.Items.Clear(); // //加载树 // this.dropParent.Items.Add(new ListItem("顶级目录", "0")); // DataRow[] drs = dt.Select("ParentId= 0"); // foreach (DataRow r in drs) // { // string nodeid = r["ClassId"].ToString(); // string text = r["ClassDesc"].ToString(); // string parentid = r["ParentId"].ToString(); // // string permissionid=r["PermissionID"].ToString(); // text = "╋" + text; // this.dropParent.Items.Add(new ListItem(text, nodeid)); // int sonparentid = int.Parse(nodeid); // string blank = "├"; // BindNode(sonparentid, dt, blank); // } // this.dropParent.DataBind(); //} //private void BindNode(int parentid, DataTable dt, string blank) //{ // DataRow[] drs = dt.Select("ParentID= " + parentid); // foreach (DataRow r in drs) // { // string nodeid = r["ClassId"].ToString(); // string text = r["ClassDesc"].ToString(); // //string permissionid=r["PermissionID"].ToString(); // text = blank + "『" + text + "』"; // this.dropParent.Items.Add(new ListItem(text, nodeid)); // int sonparentid = int.Parse(nodeid); // string blank2 = blank + "─"; // BindNode(sonparentid, dt, blank2); // } //} //#endregion private void ShowInfo(int id) { Navigation011.Para_Str = "id=" + id; Maticsoft.BLL.NewsManage.NewsClass bll = new Maticsoft.BLL.NewsManage.NewsClass(); Maticsoft.Model.NewsManage.NewsClass model = bll.GetModel(id); this.lblClassId.Text = model.ClassId.ToString(); txtClassDesc.Text = model.ClassDesc; txtClassPicture.Text = model.ClassPicture; }
private void ShowInfo(int Id) { Navigation011.Para_Str = "id=" + Id; Maticsoft.BLL.NewsManage.NewsClass bll = new Maticsoft.BLL.NewsManage.NewsClass(); Maticsoft.Model.NewsManage.NewsClass model = bll.GetModel(Id); lblClassId.Text = model.ClassId.ToString(); lblClassDesc.Text = model.ClassDesc; lblClassPicture.Text = model.ClassPicture; lblParentId.Text = model.ParentId.ToString(); }
private void ShowInfo(int Id) { Navigation011.Para_Str = "id=" + Id; Maticsoft.BLL.NewsManage.NewsClass bll = new Maticsoft.BLL.NewsManage.NewsClass(); Maticsoft.Model.NewsManage.NewsClass model = bll.GetModel(Id); lblClassId.Text = model.ClassId.ToString(); lblClassDesc.Text = model.ClassDesc; lblClassPicture.Text = model.ClassPicture; lblParentId.Text = model.ParentId.ToString(); }
protected void BindClassList(int ClassID) { string strWhere = ""; Maticsoft.BLL.NewsManage.NewsClass bll = new Maticsoft.BLL.NewsManage.NewsClass(); Maticsoft.Model.NewsManage.NewsClass model = new Maticsoft.Model.NewsManage.NewsClass(); model = bll.GetModel(ClassID); int parentid = model.ParentId; if (parentid != 0) { model = bll.GetModelByCache(parentid); parentid = model.ParentId; } strWhere = "parentid=" + model.ClassId; DataSet ds = new DataSet(); ds = bll.GetList(strWhere); DataTable dt = ds.Tables[0]; }
protected void BindClassList(int ClassID) { string strWhere = ""; Maticsoft.BLL.NewsManage.NewsClass bll = new Maticsoft.BLL.NewsManage.NewsClass(); Maticsoft.Model.NewsManage.NewsClass model = new Maticsoft.Model.NewsManage.NewsClass(); model = bll.GetModel(ClassID); int parentid = model.ParentId; if (parentid != 0) { model = bll.GetModelByCache(parentid); parentid = model.ParentId; } strWhere = "parentid=" + model.ClassId; DataSet ds = new DataSet(); ds = bll.GetList(strWhere); DataTable dt = ds.Tables[0]; }
protected void BindClassList(int ClassID) { string strWhere = ""; Maticsoft.BLL.NewsManage.NewsClass bll = new Maticsoft.BLL.NewsManage.NewsClass(); Maticsoft.Model.NewsManage.NewsClass model = new Maticsoft.Model.NewsManage.NewsClass(); model = bll.GetModel(ClassID); int parentid = model.ParentId; if (parentid != 0) { model = bll.GetModelByCache(parentid); parentid = model.ParentId; } strWhere = "parentid=" + model.ClassId; DataSet ds = new DataSet(); ds = bll.GetList(strWhere); DataTable dt = ds.Tables[0]; this.ClassName.InnerHtml = model.ClassDesc; if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { string classname = "nav_2"; // Ñ¡ÖÐ״̬Ñùʽ if (ClassID.ToString() == dt.Rows[i][0].ToString()) { classname = "nav_2_on"; } this.ClassList.InnerHtml += "<li class='" + classname + "'><img src='images/picto_feuilles.gif' align='absmiddle' /><a href='main.aspx?classid=" + dt.Rows[i][0].ToString() + "' >" + dt.Rows[i][1].ToString() + "</a></li>"; } } }
private void ShowInfo(int id) { Navigation011.Para_Str = "id=" + id; Maticsoft.BLL.NewsManage.NewsClass bll = new Maticsoft.BLL.NewsManage.NewsClass(); Maticsoft.Model.NewsManage.NewsClass model = bll.GetModel(id); this.lblClassId.Text = model.ClassId.ToString(); txtClassDesc.Text = model.ClassDesc; txtClassPicture.Text = model.ClassPicture; }
protected void gridView_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { string Dormancy = (string)DataBinder.Eval(e.Row.DataItem, "Dormancy"); int ClassId = (int)DataBinder.Eval(e.Row.DataItem, "ClassId"); int IsTop = (int)DataBinder.Eval(e.Row.DataItem, "IsTop"); if (Dormancy.ToLower() == "true") { e.Row.Cells[3].Text = "<span style=\" color:Red\">休眠</span>"; } else { e.Row.Cells[3].Text = "<span style=\" color:Green\">发布</span>"; } if (IsTop == 1) { e.Row.Cells[4].Text ="<span style=\" color:Green\">是</span>"; } else { e.Row.Cells[4].Text = "<span style=\" color:Red\">否</span>"; } Maticsoft.BLL.NewsManage.NewsClass bll = new Maticsoft.BLL.NewsManage.NewsClass(); Maticsoft.Model.NewsManage.NewsClass mod = bll.GetModel(ClassId); if (mod != null) { e.Row.Cells[5].Text = mod.ClassDesc; } else { e.Row.Cells[5].Text = "未知类别"; } } }