public void MyBind() { switch (SType) { case 1: dt = b_PageReg.SelByStatus("99", KeyWord); break; case 2: dt = b_PageReg.SelByStatus("0", KeyWord); break; case 0: default: dt = b_PageReg.SelByStatus("", KeyWord); break; } RPT.DataSource = dt; RPT.DataBind(); }
protected void RPT_ItemCommand(object source, RepeaterCommandEventArgs e) { int id = DataConvert.CLng(e.CommandArgument); if (id < 1) { return; } switch (e.CommandName) { case "user": ExOrder.Sign_User(id, "success"); break; case "teacher": ExOrder.Sign_Teacher(id, "success"); break; } RPT.DataBind(); }
public void MyBind() { DataTable tlps = tlpBll.Sel(); Tlp_DP.DataSource = tlps; Tlp_DP.DataTextField = "Alias"; Tlp_DP.DataValueField = "ID"; Tlp_DP.DataBind(); DataTable orders = orderBll.Sel(); Order_DP.DataSource = orders; Order_DP.DataTextField = "ID"; Order_DP.DataValueField = "ID"; Order_DP.DataBind(); DataTable devs = devBll.Sel(); RPT.DataSource = devs; RPT.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { RPT.SPage = MyBind; mu = buser.GetLogin(); if (!IsPostBack) { NodeUrl = "/Extend/MS.aspx";//Call.GetLabel("{ZL:GetLastinfo(34)/}"); if (mu.PageID > 1) { EliteIds = "," + eliteBll.SelEliteIds(mu.UserID) + ","; } RPT.DataBind(); RPT_QU.DataSource = DBCenter.DB.ExecuteTable(new SqlModel("SELECT * FROM EX_View_SQ_Teacher WHERE GradeID IN (SELECT MIN(GradeID) FROM EX_View_SQ_Teacher GROUP BY qu)", null)); RPT_QU.DataBind(); { DataTable dt = DBCenter.Sel("EX_View_SQ_Teacher", "ParentID>0"); RPT_SQ.DataSource = dt; RPT_SQ.DataBind(); } } }
// 店铺刷新 protected void RenoVate_Click(object sender, EventArgs e) { B_Content content = new B_Content(); string[] chkArr = GetChecked(); if (chkArr != null) { for (int i = 0; i < chkArr.Length; i++) { string username = buser.SeachByID(Convert.ToInt32(chkArr[i])).UserName; M_UserInfo dd = buser.GetUserByUserID(Convert.ToInt32(chkArr[i])); if (dd.CerificateDeadLine < DateTime.Now) { int UserId = Convert.ToInt32(chkArr[i]); content.DeCommonModel(username); buser.UpdateUserState(UserId, 0, DateTime.Now); } } } RPT.DataBind(); }
public void MyBind() { DataTable dt = new DataTable(); switch (Source) { case "bar": dt = GetDTFromBar(); break; case "plat": dt = GetDTFromPlat(); break; } RPT.DataSource = dt; RPT.DataBind(); if (dt != null && dt.Rows.Count > 0) { main_img.Src = dt.Rows[0]["Src"] as string; piccount_span.InnerText = dt.Rows.Count.ToString(); } }
public void MyBind() { pubMod = pubBll.SelReturnModel(Mid); DataTable dt = pubBll.SelByTbName(pubMod.PubTableName); Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li class='active'><a href='FormManage.aspx'>互动表单管理</a></li><li>当前表单:<a href='" + Request.RawUrl + "'>" + pubMod.PubName + "</a></li>"); if (dt.Rows.Count < 1) { EmptyDiv.Visible = true; return; } //-------------------------------------------------- DataTable ResultDT = GetStruct(HttpUtility.HtmlDecode(dt.Rows[0]["PubContent"].ToString())); foreach (DataRow dr in dt.Rows) { string json = HttpUtility.HtmlDecode(dr["PubContent"].ToString()); JArray array = (JArray)JsonConvert.DeserializeObject(json); DataRow resultDR = ResultDT.NewRow(); foreach (JObject model in array) { string ctype = model["ctype"].ToString().ToLower(); if (ctype.Equals("img") || ctype.Equals("str")) { continue; } resultDR[model["title"].ToString()] = model["value"].ToString(); } resultDR["EndChar"] = "end"; resultDR["ID"] = dr["ID"]; resultDR["IP地址"] = dr["PubIP"]; ResultDT.Rows.Add(resultDR); } int pageCount = 0; RPT.DataSource = PageCommon.GetPageDT(PageSize, CPage, ResultDT, out pageCount); Page_Lit.Text = PageCommon.CreatePageHtml(pageCount, CPage); RPT.DataBind(); }
private void MyBind() { DataTable dt = new DataTable(); if (!string.IsNullOrEmpty(KeyWord)) { dt = buser.SearchByInfo(KeyWord); curLabel.Text = "关键词搜索"; } else if (!string.IsNullOrEmpty(GroupID)) { M_Structure strmod = struBll.SelReturnModel(DataConvert.CLng(GroupID)); ManagerIDS = strmod.ManagerIDS; dt = buser.SelectUserByIds(strmod.UserIDS); } else { dt = buser.SelAll(); curLabel.Text = "全部会员"; } RPT.DataSource = dt; RPT.DataBind(); }
public void MyBind() { M_UserInfo mu = buser.GetLogin(); M_Design_SiteInfo sfMod = sfBll.SelReturnModel(mu.SiteID); DataTable nodetable = nodeBll.SelForShowAll(0, true); nodetable.DefaultView.RowFilter = "NodeBySite='" + mu.SiteID + "'"; nodetable = nodetable.DefaultView.ToTable(); DataRow dr = nodetable.NewRow();//根节点 dr["NodeID"] = 0; dr["NodeType"] = 0; dr["NodeName"] = sfMod.SiteName; dr["NodeDir"] = "root"; dr["CDate"] = sfMod.CDate; dr["Depth"] = 0; dr["ItemCount"] = nodetable.Compute("SUM(ItemCount)", "ParentID=0"); dr["ChildCount"] = nodetable.Rows.Count; dr["SafeGuard"] = 0; nodetable.Rows.InsertAt(dr, 0); RPT.DataSource = nodetable; RPT.DataBind(); }
public void MyBind() { DataSet ds = new DataSet(); ds.ReadXml(xmlPath); for (int i = 1; i < ds.Tables.Count; i++) { ds.Tables[0].Merge(ds.Tables[i]); } if (ds.Tables[0].Columns["isAdd"] == null) { ds.Tables[0].Columns.Add("isAdd", typeof(string)); } ds.Tables[0].DefaultView.RowFilter = "isAdd=1"; DataTable resultDT = ds.Tables[0].DefaultView.ToTable(); resultDT.Columns.Add("ID", typeof(int));//用来作为标识位 for (int i = 0; i < resultDT.Rows.Count; i++) { resultDT.Rows[i]["ID"] = i + 1; } RPT.DataSource = resultDT; RPT.DataBind(); }
/// <summary> /// 通用分页过程 by h. /// </summary> /// <param name="Cll"></param> public void Page_list(DataTable Cll) { RPT.DataSource = Cll; RPT.DataBind(); }
private void MyBind() { RPT.DataSource = cateBll.SelByGuest(); RPT.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { B_Admin.CheckIsLogged(); if (function.isAjax()) { string action = Request.Form["action"], vpath = Request.Form["vpath"], result = "", warning = "";//动作,需要加水印的图片路径 if (vpath.Contains("?")) { vpath = vpath.Substring(0, vpath.IndexOf("?")); } switch (action) { case "crop": //根据提交的图片路径与宽度等参数,完成剪切 int x1 = int.Parse(Request.Form["x1"]); int y1 = int.Parse(Request.Form["y1"]); int width = int.Parse(Request.Form["width"]); int height = int.Parse(Request.Form["height"]); savePath += (function.GetRandomString(4) + Path.GetFileName(vpath)); result = ImageDealLib.imgcrop(vpath, savePath, x1, y1, width, height, ImageDealLib.FileCache.Save, out warning); break; case "fontwater": //文字水印 { System.Drawing.Image fontimg = AddFontWater(savePath + function.GetRandomString(6) + ".jpg"); savePath += "fontw_" + Path.GetFileName(vpath); result = ImageDealLib.makewatermark(vpath, fontimg, GetWaterType(Request.Form["pos"]), savePath, ImageDealLib.ImageType.JPEG, ImageDealLib.FileCache.Save, out warning); result += "?" + function.GetRandomString(6); } break; case "imgwater": //水印图片路径 { string watervpath = Request.Form["watervpath"]; int trans = DataConverter.CLng(Request.Form["trans"]); savePath += "imgw_" + Path.GetFileName(vpath); result = ImageDealLib.makewatermark(vpath, watervpath, GetWaterType(Request.Form["pos"]), savePath, ImageDealLib.ImageType.JPEG, ImageDealLib.FileCache.Save, out warning, trans); result += "?" + function.GetRandomString(6); } break; } Response.Write(result); Response.Flush(); Response.End(); } if (!IsPostBack) { if (string.IsNullOrEmpty(IPath) || !SafeC.IsImage(IPath)) { function.WriteErrMsg("只允许编辑图片文件!"); } if (!Directory.Exists(savePath)) { Directory.CreateDirectory(Server.MapPath(savePath)); } if (!File.Exists(Server.MapPath(IPath))) { function.WriteErrMsg("需要修改的图片" + IPath + "不存在"); } NowImg_Hid.Value = SourceImg_Hid.Value = IPath; RPT.DataSource = GetWaterImgDT(); RPT.DataBind(); //string warning; //----剪切图 //vpath = ImageDealLib.imgcrop("/test/222.jpg", "/test/", 200, 200, 200, 200, ImageDealLib.FileCache.Save, out warning); //function.WriteErrMsg(vpath); //----生成水印 //string watervpath = AddFontWater(); //ImageDealLib.makewatermark("/test/222.jpg", "/test/usbqyr.jpg", ImageDealLib.WaterType.RightDown, "/test/", ImageDealLib.ImageType.JPEG, ImageDealLib.FileCache.Save, out warning); //----我们的水印 //WaterImages water = new WaterImages(); //string localPath = Server.MapPath("/test/222.jpg"); //string tempurl = Server.MapPath("/test/watered12.jpg"); //water.DrawImage(localPath, function.VToP("/Images/admin_logo.jpg"), tempurl); } }
protected void Search_Btn_Click(object sender, EventArgs e) { RPT.DataBind(); }
public void MyBind() { RPT.DataSource = B_GradeOption.GetGradeList(CateID, 0); RPT.DataBind(); }
private void ReBind() { RPT.CPage = 1; RPT.DataBind(); }
public void MyBind() { int pageCount = 0; DataTable dt = new DataTable(); M_UserInfo mu = tpuser_Bll.GetLogin(); //barBll.GetUser(); if (!string.IsNullOrEmpty(Request.QueryString["searchstr"]) || !string.IsNullOrEmpty(Request.QueryString["uid"]) || !string.IsNullOrEmpty(Request.QueryString["islike"])) { string skey = Request.QueryString["searchstr"]; int uid = DataConvert.CLng(Request.QueryString["uid"]); bool sellike = DataConvert.CLng(Request.QueryString["islike"]) > 0 ? true : false; string skeyTlp = "\"<span style='color:#ff6a00;'>{0}</span>\""; if (!string.IsNullOrEmpty(skey)) { BarName_L.Text = "相关" + string.Format(skeyTlp, skey) + "的贴子"; Title_L.Text = skey + "\"的贴子"; dt = barBll.SelByCateID(skey, 3); } else if (sellike) { BarName_L.Text = string.Format(skeyTlp, "我的收藏"); Title_L.Text = "我的收藏"; dt = barBll.SelByCateID(mu.UserID.ToString(), 4); } else { M_UserInfo smu = new M_UserInfo(); if (uid < 1)//匿名用户不允许搜索 { smu.UserName = "******"; } else { smu = buser.GetUserByUserID(uid); dt = barBll.SelByCateID(uid.ToString(), 2); } BarName_L.Text = string.Format(skeyTlp, smu.HoneyName) + "的贴子"; Title_L.Text = smu.HoneyName + "的贴子"; } Cid = cateMod.CateID; totalspan.InnerText = "共搜索到" + dt.Rows.Count + "个贴子"; function.Script(this, "SetImg('/App_Themes/User/timg.jpg');"); IsSearch = true; MsgTitle_T.Enabled = false; MsgContent_T.Enabled = false; SendDiv.Visible = false; } else { Cid = cateMod.CateID; dt = barBll.SelByCateID(CateID.ToString(), 1, true); cateMod = guestBll.GetCate(CateID); #region 权限校验 if (cateMod.IsBarOwner(mu.UserID)) { barowner_div.Visible = true; IsBarOwner = true; DPBind(); } else//非吧主权限验证 { switch (cateMod.PermiBit) { case "1": //版面类别 emptydiv.Style.Add("display", "none"); send_div.Visible = false; RPT.Visible = false; break; default: if (!authBll.AuthCheck(cateMod, mu, "needlog")) //访问权限 { function.WriteErrMsg("你没有访问权限"); } if (!authBll.AuthCheck(cateMod, mu, "send")) //发贴权限 { send_div.Visible = false; noauth_div.Visible = true; } break; } } #endregion BarInfo_L.Text = cateMod.Desc; function.Script(this, "SetImg('" + cateMod.BarImage + "');"); if (cateMod.IsNull) { function.WriteErrMsg("该贴吧不存在!!"); } Title_L.Text = cateMod.CateName; BarName_L.Text = cateMod.CateName; DataTable chdt = B_GuestBook.GetCateList(CateID); if (chdt.Rows.Count > 0) { ChildRPT.DataSource = chdt; ChildRPT.DataBind(); } else { childBar.Visible = false; } } RPT.DataSource = PageCommon.GetPageDT(pageSize, CPage, dt, out pageCount); RPT.DataBind(); int tiecount = 0; int recout = 0; barBll.GetCount(CateID, out tiecount, out recout); replycount.InnerText = recout.ToString(); dnum_span.InnerText = dt.Rows.Count.ToString(); dnum_span2.InnerText = tiecount.ToString(); pagenum_span1.InnerText = pageCount.ToString(); MsgPage_L.Text = PageCommon.CreatePageHtml(pageCount, CPage); if (dt.Rows.Count > 0) { contentdiv.Visible = true; } else { emptydiv.Visible = true; } Anony_Span.Visible = mu.UserID <= 0; }
public void MyBind() { RPT.DataSource = GetDt(); RPT.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { RPT.DataSource = senBll.SelTop(); RPT.DataBind(); }
protected void Bind(DataTable dt) { RPT.DataSource = dt; RPT.DataBind(); }
public void MyBind() { RPT.DataSource = knowBll.Select_All(NodeID, 0); RPT.DataBind(); }
public void MyBind(string skey = "") { RPT.DataSource = comBll.Sel("2", -100, MsgID, "", skey); RPT.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { buser.CheckIsLogin(); if (function.isAjax()) { string action = Request.Form["action"], vpath = Request.Form["vpath"], result = "", warning = "";//动作,需要加水印的图片路径 if (vpath.Contains("?")) { vpath = vpath.Substring(0, vpath.IndexOf("?")); } switch (action) { case "crop": //根据提交的图片路径与宽度等参数,完成剪切 { int x1 = int.Parse(Request.Form["x1"]); int y1 = int.Parse(Request.Form["y1"]); int width = int.Parse(Request.Form["width"]); int height = int.Parse(Request.Form["height"]); savePath += (function.GetRandomString(4) + Path.GetFileName(vpath)); result = ImageDealLib.imgcrop(vpath, savePath, x1, y1, width, height, ImageDealLib.FileCache.Save, out warning); } break; case "rotate": { int angle = DataConverter.CLng(Request.Form["angle"]); Bitmap bmp = imgHelper.Rotate(vpath, angle); savePath += function.GetRandomString(6) + Path.GetExtension(vpath); result = imgHelper.SaveImg(savePath, bmp); bmp.Dispose(); } break; case "zoom": //缩放 { int width = int.Parse(Request.Form["width"]); int height = int.Parse(Request.Form["height"]); savePath += (function.GetRandomString(4) + Path.GetFileName(vpath)); Bitmap bmp = imgHelper.ZoomImg(vpath, height, width); result = imgHelper.SaveImg(savePath, bmp); } break; case "fontwater": //文字水印 { System.Drawing.Image fontimg = AddFontWater(savePath + function.GetRandomString(6) + ".jpg"); savePath += "fontw_" + Path.GetFileName(vpath); result = ImageDealLib.makewatermark(vpath, fontimg, GetWaterType(Request.Form["pos"]), savePath, ImageDealLib.ImageType.JPEG, ImageDealLib.FileCache.Save, out warning); result += "?" + function.GetRandomString(6); } break; case "imgwater": //水印图片路径 { string watervpath = Request.Form["watervpath"]; int trans = DataConverter.CLng(Request.Form["trans"]); savePath += "imgw_" + Path.GetFileName(vpath); result = ImageDealLib.makewatermark(vpath, watervpath, GetWaterType(Request.Form["pos"]), savePath, ImageDealLib.ImageType.JPEG, ImageDealLib.FileCache.Save, out warning, trans); result += "?" + function.GetRandomString(6); } break; } Response.Write(result); Response.Flush(); Response.End(); } if (!IsPostBack) { M_UserInfo mu = buser.GetLogin(); string ipath = Request.QueryString["ipath"].ToLower().Replace("/uploadfiles/user/", ""); string UserPath = "/UploadFiles/User/" + mu.UserName + mu.UserID + "/" + ipath.TrimStart('/');//不做过多的限制,如需要文件安全,则使用单独的文件服务器 if (string.IsNullOrEmpty(UserPath) || !SafeC.IsImage(UserPath)) { function.WriteErrMsg("只允许编辑图片文件!"); } if (!Directory.Exists(savePath)) { Directory.CreateDirectory(Server.MapPath(savePath)); } if (!File.Exists(Server.MapPath(UserPath))) { function.WriteErrMsg("需要修改的图片" + UserPath + "不存在"); } NowImg_Hid.Value = SourceImg_Hid.Value = UserPath; System.Drawing.Image img = System.Drawing.Image.FromFile(Server.MapPath(UserPath)); ImgWidth_Hid.Value = img.Width.ToString(); ImgHeight_Hid.Value = img.Height.ToString(); RPT.DataSource = GetWaterImgDT(); RPT.DataBind(); img.Dispose(); //string warning; //----剪切图 //vpath = ImageDealLib.imgcrop("/test/222.jpg", "/test/", 200, 200, 200, 200, ImageDealLib.FileCache.Save, out warning); //function.WriteErrMsg(vpath); //----生成水印 //string watervpath = AddFontWater(); //ImageDealLib.makewatermark("/test/222.jpg", "/test/usbqyr.jpg", ImageDealLib.WaterType.RightDown, "/test/", ImageDealLib.ImageType.JPEG, ImageDealLib.FileCache.Save, out warning); //----我们的水印 //WaterImages water = new WaterImages(); //string localPath = Server.MapPath("/test/222.jpg"); //string tempurl = Server.MapPath("/test/watered12.jpg"); //water.DrawImage(localPath, function.VToP("/Images/admin_logo.jpg"), tempurl); } }
protected void Page_Load(object sender, EventArgs e) { if (B_Admin.GetLogin() == null) { B_User.CheckIsLogged(); } else { B_Admin.CheckIsLogged(); } if (function.isAjax()) { string action = Request.Form["action"], vpath = Request.Form["vpath"], result = "", warning = "";//动作,需要加水印的图片路径 if (vpath.Contains("?")) { vpath = vpath.Substring(0, vpath.IndexOf("?")); } switch (action) { case "crop": //根据提交的图片路径与宽度等参数,完成剪切 { int x1 = int.Parse(Request.Form["x1"]); int y1 = int.Parse(Request.Form["y1"]); int width = int.Parse(Request.Form["width"]); int height = int.Parse(Request.Form["height"]); savePath += (function.GetRandomString(4) + Path.GetFileName(vpath)); result = ImageDealLib.imgcrop(vpath, savePath, x1, y1, width, height, ImageDealLib.FileCache.Save, out warning); } break; case "rotate": { int angle = DataConverter.CLng(Request.Form["angle"]); Bitmap bmp = imgHelper.Rotate(vpath, angle); savePath += function.GetRandomString(6) + Path.GetExtension(vpath); result = imgHelper.SaveImg(savePath, bmp); bmp.Dispose(); } break; case "zoom": //缩放 { int width = int.Parse(Request.Form["width"]); int height = int.Parse(Request.Form["height"]); savePath += (function.GetRandomString(4) + Path.GetFileName(vpath)); Bitmap bmp = imgHelper.ZoomImg(vpath, height, width); result = imgHelper.SaveImg(savePath, bmp); } break; case "fontwater": //文字水印 { System.Drawing.Image fontimg = AddFontWater(savePath + function.GetRandomString(6) + ".jpg"); savePath += "fontw_" + Path.GetFileName(vpath); result = ImageDealLib.makewatermark(vpath, fontimg, GetWaterType(Request.Form["pos"]), savePath, ImageDealLib.ImageType.JPEG, ImageDealLib.FileCache.Save, out warning); result += "?" + function.GetRandomString(6); } break; case "imgwater": //水印图片路径 { string watervpath = Request.Form["watervpath"]; int trans = DataConverter.CLng(Request.Form["trans"]); savePath += "imgw_" + Path.GetFileName(vpath); result = ImageDealLib.makewatermark(vpath, watervpath, GetWaterType(Request.Form["pos"]), savePath, ImageDealLib.ImageType.JPEG, ImageDealLib.FileCache.Save, out warning, trans); result += "?" + function.GetRandomString(6); } break; } Response.Write(result); Response.Flush(); Response.End(); } if (!IsPostBack) { if (string.IsNullOrEmpty(IPath) || !SafeC.IsImage(IPath)) { function.WriteErrMsg("只允许编辑图片文件!"); } if (!Directory.Exists(Server.MapPath(savePath))) { Directory.CreateDirectory(Server.MapPath(savePath)); } if (!File.Exists(Server.MapPath(IPath))) { function.WriteErrMsg("需要修改的图片" + IPath + "不存在"); } NowImg_Hid.Value = SourceImg_Hid.Value = IPath; System.Drawing.Image img = System.Drawing.Image.FromFile(Server.MapPath(IPath)); ImgWidth_Hid.Value = img.Width.ToString(); ImgHeight_Hid.Value = img.Height.ToString(); RPT.DataSource = GetWaterImgDT(); RPT.DataBind(); img.Dispose(); } }
public void MyBind() { RPT.DataSource = examBll.GetSelectByC_ClassId(0); RPT.DataBind(); }
private void MyBind() { //tableset.ReadXml(serverdomain + "/api/gettemplate.aspx?menu=getprojectinfo"); RPT.DataSource = TempDT.ToTable(); RPT.DataBind(); }
protected void skey_btn_Click(object sender, EventArgs e) { RPT.DataBind(); }
private void MyBind() { RPT.DataSource = SelMyLend(); RPT.DataBind(); }
private void MyBind() { RPT.DataSource = FileSystemObject.GetDirectorySmall(SiteConfig.SiteMapath() + "Template"); RPT.DataBind(); }
public void MyBind() { RPT.DataSource = TempBll.SelByPid(Pid); RPT.DataBind(); }