protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); MyModel.ID = int.Parse(Request.QueryString["ID"].ToString()); MyModel.FileName = this.TextBox1.Text; MyModel.BianHao = this.TextBox2.Text; MyModel.BackInfo = ""; MyModel.DaXiao = 0; MyModel.FileType = "dir"; MyModel.DirID = int.Parse(Request.QueryString["DirID"].ToString()); MyModel.ShangChuanTime = DateTime.Now; MyModel.FilePath = ""; MyModel.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyModel.IFDel = "否"; MyModel.TypeName = Request.QueryString["Type"].ToString(); MyModel.IfShare = this.RadioButtonList1.SelectedItem.Text; MyModel.DirOrFile = 1; MyModel.CanView = txtCanView.Text; MyModel.CanAdd = txtCanAdd.Text; MyModel.CanMod = txtCanMod.Text; MyModel.CanDel = txtCanDel.Text; MyModel.Update(); //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户修改文件夹信息(" + this.TextBox1.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); ZWL.Common.MessageBox.ShowAndRedirect(this, "文件夹修改成功!", "DocCenter.aspx?Type=" + Request.QueryString["Type"].ToString() + "&DirID=" + Request.QueryString["DirID"].ToString()); }
protected void ImageButton1_Click(object sender, EventArgs e) { ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); MyModel.FileName = this.TextBox1.Text; MyModel.BianHao = this.TextBox2.Text; MyModel.BackInfo = ""; MyModel.DaXiao = 0; MyModel.FileType = "dir"; MyModel.DirID = int.Parse(Request.QueryString["DirID"].ToString()); MyModel.ShangChuanTime = DateTime.Now; MyModel.FilePath = ""; MyModel.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyModel.IFDel = "否"; MyModel.TypeName = Request.QueryString["Type"].ToString(); MyModel.IfShare = this.RadioButtonList1.SelectedItem.Text; MyModel.DirOrFile = 1; MyModel.Add(); //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户添加文件夹信息(" + this.TextBox1.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); ZWL.Common.MessageBox.ShowAndRedirect(this, "文件夹添加成功!", "DocCenter.aspx?Type=" + Request.QueryString["Type"].ToString() + "&DirID=" + Request.QueryString["DirID"].ToString()); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.Label8.Text = MyModel.FileName; //this.HyperLink1.Text = MyModel.FileName; //this.HyperLink1.NavigateUrl = "../UploadFile/" + MyModel.FilePath; this.Label7.Text = ZWL.Common.PublicMethod.GetWenJian(MyModel.FilePath, "../UploadFile/"); this.Label1.Text = MyModel.BianHao; this.Label6.Text = MyModel.BackInfo; this.Label2.Text = MyModel.DaXiao.ToString(); this.Label3.Text = MyModel.ShangChuanTime.ToString(); this.Label4.Text = MyModel.UserName; this.Label5.Text = MyModel.FileType; this.Label9.Text = MyModel.CanView; this.Label10.Text = MyModel.CanAdd; this.Label11.Text = MyModel.CanMod; this.Label12.Text = MyModel.CanDel; //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "查看文件信息(" + this.Label8.Text + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString())); //this.HyperLink1.Text = MyModel.FileName; //this.HyperLink1.NavigateUrl = "../UploadFile/" + MyModel.FilePath; this.Label4.Text = ZWL.Common.PublicMethod.GetWenJian2(MyModel.FilePath, "../UploadFile/"); this.Label5.Text = MyModel.FileName; this.TextBox1.Text = MyModel.BianHao; this.TxtContent.Text = MyModel.BackInfo; this.Label1.Text = MyModel.DaXiao.ToString(); this.Label2.Text = MyModel.FileType; this.Label3.Text = MyModel.FilePath; txtCanView.Text = MyModel.CanView; txtCanAdd.Text = MyModel.CanAdd; txtCanMod.Text = MyModel.CanMod; txtCanDel.Text = MyModel.CanDel; } }
public void DataBindToGridview() { ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); GVData.DataSource = MyModel.GetList("IFDel='是' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); GVData.DataBind(); LabPageSum.Text = Convert.ToString(GVData.PageCount); LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1)); this.GoPage.Text = LabCurrentPage.Text.ToString(); }
public void DataBindToGridview() { GVData.PageSize = AspNetPager1.PageSize; GVData.PageIndex = AspNetPager1.CurrentPageIndex - 1; ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); DataSet ds = MyModel.GetList("IFDel='是' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); GVData.DataSource = ds; GVData.DataBind(); AspNetPager1.RecordCount = ds.Tables[0].Rows.Count; }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.TextBox1.Text = MyModel.FileName; this.TextBox2.Text = MyModel.BianHao; this.RadioButtonList1.SelectedValue = MyModel.IfShare; } }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { string FileNameStr = ZWL.Common.PublicMethod.UploadFileIntoDir(this.FileUpload1, DateTime.Now.Ticks.ToString() + System.IO.Path.GetExtension(FileUpload1.PostedFile.FileName)); if (FileNameStr.Trim().Length > 0) { ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); MyModel.FileName = System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName); MyModel.BianHao = this.TextBox1.Text; MyModel.BackInfo = this.TxtContent.Text; MyModel.DaXiao = (this.FileUpload1.PostedFile.ContentLength / 1024) + 1; try { MyModel.FileType = this.FileUpload1.FileName.Remove(0, this.FileUpload1.FileName.LastIndexOf('.') + 1); } catch { } MyModel.DirID = int.Parse(Request.QueryString["DirID"].ToString()); MyModel.ShangChuanTime = DateTime.Now; MyModel.FilePath = FileNameStr; MyModel.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyModel.IFDel = "否"; MyModel.TypeName = Request.QueryString["Type"].ToString(); MyModel.IfShare = "否"; MyModel.DirOrFile = 0; MyModel.CanView = txtCanView.Text; MyModel.CanAdd = txtCanAdd.Text; MyModel.CanMod = txtCanMod.Text; MyModel.CanDel = txtCanDel.Text; MyModel.DaoQiShijian = DateTime.Parse(txtDaoQiShijian.Text); MyModel.ShiFouTiXing = Int32.Parse(rdoShiFouTiXing.SelectedValue); MyModel.Add(); //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户添加文件信息(" + System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName) + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); ZWL.Common.MessageBox.ShowAndRedirect(this, "文件添加成功!", "DocCenter.aspx?Type=" + Request.QueryString["Type"].ToString() + "&DirID=" + Request.QueryString["DirID"].ToString()); } }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { string FileNameStr = ZWL.Common.PublicMethod.UploadFileIntoDir(this.FileUpload1, DateTime.Now.Ticks.ToString() + System.IO.Path.GetExtension(FileUpload1.PostedFile.FileName)); if (FileNameStr.Trim().Length > 0) { ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); MyModel.FileName = System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName); MyModel.BianHao = this.TextBox1.Text; MyModel.BackInfo = this.TxtContent.Text; MyModel.DaXiao = (this.FileUpload1.PostedFile.ContentLength / 1024)+1; try { MyModel.FileType = this.FileUpload1.FileName.Remove(0, this.FileUpload1.FileName.LastIndexOf('.') + 1); } catch { } MyModel.DirID = int.Parse(Request.QueryString["DirID"].ToString()); MyModel.ShangChuanTime = DateTime.Now; MyModel.FilePath = FileNameStr; MyModel.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyModel.IFDel = "否"; MyModel.TypeName = Request.QueryString["Type"].ToString(); MyModel.IfShare = "否"; MyModel.DirOrFile =0; MyModel.CanView = txtCanView.Text; MyModel.CanAdd = txtCanAdd.Text; MyModel.CanMod = txtCanMod.Text; MyModel.CanDel = txtCanDel.Text; MyModel.DaoQiShijian = DateTime.Parse(txtDaoQiShijian.Text); MyModel.ShiFouTiXing = Int32.Parse(rdoShiFouTiXing.SelectedValue); MyModel.Add(); //写系统日志 ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi(); MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName"); MyRiZhi.DoSomething = "用户添加文件信息(" + System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName) + ")"; MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString(); MyRiZhi.Add(); ZWL.Common.MessageBox.ShowAndRedirect(this, "文件添加成功!", "DocCenter.aspx?Type=" + Request.QueryString["Type"].ToString() + "&DirID=" + Request.QueryString["DirID"].ToString()); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.TextBox1.Text = MyModel.FileName; this.TextBox2.Text = MyModel.BianHao; this.RadioButtonList1.SelectedValue = MyModel.IfShare; txtCanView.Text = MyModel.CanView; txtCanAdd.Text = MyModel.CanAdd; txtCanMod.Text = MyModel.CanMod; txtCanDel.Text = MyModel.CanDel; } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ZWL.Common.PublicMethod.CheckSession(); ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); MyModel.GetModel(int.Parse(Request.QueryString["ID"].ToString())); this.HyperLink1.Text = MyModel.FileName; this.HyperLink1.NavigateUrl = "../UploadFile/" + MyModel.FilePath; this.TextBox1.Text = MyModel.BianHao; this.TxtContent.Text = MyModel.BackInfo; this.Label1.Text = MyModel.DaXiao.ToString(); this.Label2.Text = MyModel.FileType; this.Label3.Text = MyModel.FilePath; this.HyperLink2.NavigateUrl = "../DsoFramer/ReadFile.aspx?FilePath=" + this.Label3.Text; this.HyperLink3.NavigateUrl = "../DsoFramer/EditFile.aspx?FilePath=" + this.Label3.Text; } }
public void DataBindToGridview() { DataEntityDataContext context = new DataEntityDataContext(); ZWL.BLL.ERPFileList MyLanEmail = new ZWL.BLL.ERPFileList(); string DirID = "0"; try { DirID = Request.QueryString["DirID"].ToString(); } catch { } ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); if (Request.QueryString["Type"].ToString().Trim() == "个人文件") { var T = context.ERPFileList.Where(p => p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName") && p.IFDel == "否" && p.TypeName==Request.QueryString["Type"].ToString().Trim() && p.FileType!="dir").OrderByDescending(p => p.ID); EmailList = T.ToList(); } else if (Request.QueryString["Type"].ToString().Trim() == "单位文件") { var T = context.ERPFileList.Where(p => (p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName") || p.CanView.Contains(ZWL.Common.PublicMethod.GetSessionValue("UserName"))) && p.IFDel == "否" && p.TypeName == Request.QueryString["Type"].ToString().Trim() && p.FileType != "dir").OrderByDescending(p => p.ID); EmailList = T.ToList(); } else if (Request.QueryString["Type"].ToString().Trim() == "知识库") { var T = context.ERPFileList.Where(p => (p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName") || p.CanView.Contains(ZWL.Common.PublicMethod.GetSessionValue("UserName"))) && p.IFDel == "否" && p.TypeName == Request.QueryString["Type"].ToString().Trim() && p.FileType != "dir").OrderByDescending(p => p.ID); EmailList = T.ToList(); } else if (Request.QueryString["Type"].ToString().Trim() == "共享文件") { var T = context.ERPFileList.Where(p => p.IFDel == "否" && p.IfShare=="是").OrderByDescending(p => p.ID); var TT = context.ERPFileList.Where(p=>p.FileType!="dir" && T.Where(c=>c.DirID==p.DirID).Count()>0); EmailList = TT.ToList(); } }
public void DataBindToGridview() { DataEntityDataContext context = new DataEntityDataContext(); ZWL.BLL.ERPFileList MyLanEmail = new ZWL.BLL.ERPFileList(); string DirID = "0"; try { DirID = Request.QueryString["DirID"].ToString(); } catch { } ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); if (Request.QueryString["Type"].ToString().Trim() == "个人文件") { var T = context.ERPFileList.Where(p => p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName") && p.IFDel == "否" && p.TypeName == Request.QueryString["Type"].ToString().Trim() && p.FileType != "dir").OrderByDescending(p => p.ID); EmailList = T.ToList(); } else if (Request.QueryString["Type"].ToString().Trim() == "单位文件") { var T = context.ERPFileList.Where(p => (p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName") || p.CanView.Contains(ZWL.Common.PublicMethod.GetSessionValue("UserName"))) && p.IFDel == "否" && p.TypeName == Request.QueryString["Type"].ToString().Trim() && p.FileType != "dir").OrderByDescending(p => p.ID); EmailList = T.ToList(); } else if (Request.QueryString["Type"].ToString().Trim() == "知识库") { var T = context.ERPFileList.Where(p => (p.UserName == ZWL.Common.PublicMethod.GetSessionValue("UserName") || p.CanView.Contains(ZWL.Common.PublicMethod.GetSessionValue("UserName"))) && p.IFDel == "否" && p.TypeName == Request.QueryString["Type"].ToString().Trim() && p.FileType != "dir").OrderByDescending(p => p.ID); EmailList = T.ToList(); } else if (Request.QueryString["Type"].ToString().Trim() == "共享文件") { var T = context.ERPFileList.Where(p => p.IFDel == "否" && p.IfShare == "是").OrderByDescending(p => p.ID); var TT = context.ERPFileList.Where(p => p.FileType != "dir" && T.Where(c => c.DirID == p.DirID).Count() > 0); EmailList = TT.ToList(); } }
public void DataBindToGridview() { string DirID = "0"; try { DirID = Request.QueryString["DirID"].ToString(); } catch { } ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); if (Request.QueryString["Type"].ToString().Trim() == "个人文件") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|029N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|029A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|029M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|029D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|029E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and UserName='******' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "单位文件") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|030N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|030A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|030M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|030D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|030E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and (( ','+CanView+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%') or UserName='******') and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "项目文件") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|031N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|031A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|031M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|031D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|031E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and (( ','+CanView+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%') or UserName='******') and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "电子刊物") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|032N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|032A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|032M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|032D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|032E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and (( ','+CanView+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%') or UserName='******') and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "重要文件") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|033N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|033A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|033M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|033D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|033E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and (( ','+CanView+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%') or UserName='******') and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "机密文件") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|034N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|034A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|034M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|034D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|034E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and (( ','+CanView+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%') or UserName='******') and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "知识库") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|035N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|035A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|035M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|035D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|035E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and (( ','+CanView+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%') or UserName='******') and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "技术文件") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|036N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|036A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|036M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|036D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|036E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and (( ','+CanView+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%') or UserName='******') and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "共享文件") { if (DirID == "0") { GVData.DataSource = MyModel.GetList("IFDel='否' and IfShare='是' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else { GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } //隐藏添加、修改、删除 this.ImageButton1.Visible = false; this.ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|037E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); this.ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|037D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); this.ImageButton5.Visible = false; this.ImageButton6.Visible = false; } /* Response.Write("DirID=" + DirID + " and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); */ GVData.DataBind(); LabPageSum.Text = Convert.ToString(GVData.PageCount); LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1)); this.GoPage.Text = LabCurrentPage.Text.ToString(); //重新根据当前文件夹可添加、可删除、可修改 重新判读按钮显示(非第一级目录) if (DirID != "0" && Request.QueryString["Type"].ToString().Trim() != "个人文件" && Request.QueryString["Type"].ToString().Trim() != "共享文件") { DataSet MYQXDT = ZWL.DBUtility.DbHelperSQL.GetDataSet("select * from ERPFileList where ID=" + DirID); if (MYQXDT.Tables[0].Rows.Count > 0) { string CanAddStr = "," + MYQXDT.Tables[0].Rows[0]["CanAdd"].ToString() + "," + MYQXDT.Tables[0].Rows[0]["UserName"].ToString() + ","; string CanModStr = "," + MYQXDT.Tables[0].Rows[0]["CanMod"].ToString() + "," + MYQXDT.Tables[0].Rows[0]["UserName"].ToString() + ","; string CanDelStr = "," + MYQXDT.Tables[0].Rows[0]["CanDel"].ToString() + "," + MYQXDT.Tables[0].Rows[0]["UserName"].ToString() + ","; ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",", CanAddStr); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",", CanAddStr); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",", CanModStr); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",", CanDelStr); } } }
public void DataBindToGridview() { string DirID = "0"; try { DirID = Request.QueryString["DirID"].ToString(); } catch { } ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); if (Request.QueryString["Type"].ToString().Trim() == "个人文件") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|029N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|029A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|029M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|029D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|029E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and UserName='******' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "单位文件") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|030N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|030A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|030M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|030D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|030E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and (( ','+CanView+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%') or UserName='******') and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "项目文件") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|031N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|031A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|031M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|031D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|031E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and (( ','+CanView+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%') or UserName='******') and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "电子刊物") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|032N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|032A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|032M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|032D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|032E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and (( ','+CanView+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%') or UserName='******') and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "重要文件") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|033N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|033A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|033M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|033D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|033E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and (( ','+CanView+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%') or UserName='******') and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "机密文件") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|034N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|034A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|034M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|034D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|034E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and (( ','+CanView+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%') or UserName='******') and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "知识库") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|035N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|035A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|035M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|035D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|035E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and (( ','+CanView+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%') or UserName='******') and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "技术文件") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|036N|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|036A|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|036M|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|036D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|036E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and (( ','+CanView+',' like '%," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",%') or UserName='******') and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "共享文件") { if (DirID == "0") { GVData.DataSource = MyModel.GetList("IFDel='否' and IfShare='是' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else { GVData.DataSource = MyModel.GetList("DirID=" + DirID + " and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } //隐藏添加、修改、删除 this.ImageButton1.Visible = false; this.ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|037E|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); this.ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|037D|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); this.ImageButton5.Visible = false; this.ImageButton6.Visible = false; } GVData.DataBind(); LabPageSum.Text = Convert.ToString(GVData.PageCount); LabCurrentPage.Text = Convert.ToString(((int)GVData.PageIndex + 1)); this.GoPage.Text = LabCurrentPage.Text.ToString(); //重新根据当前文件夹可添加、可删除、可修改 重新判读按钮显示(非第一级目录) if (DirID != "0" && Request.QueryString["Type"].ToString().Trim() != "个人文件" && Request.QueryString["Type"].ToString().Trim() != "共享文件") { DataSet MYQXDT = ZWL.DBUtility.DbHelperSQL.GetDataSet("select * from ERPFileList where ID=" + DirID); if (MYQXDT.Tables[0].Rows.Count > 0) { string CanAddStr = "," + MYQXDT.Tables[0].Rows[0]["CanAdd"].ToString() + "," + MYQXDT.Tables[0].Rows[0]["UserName"].ToString() + ","; string CanModStr = "," + MYQXDT.Tables[0].Rows[0]["CanMod"].ToString() + "," + MYQXDT.Tables[0].Rows[0]["UserName"].ToString() + ","; string CanDelStr = "," + MYQXDT.Tables[0].Rows[0]["CanDel"].ToString() + "," + MYQXDT.Tables[0].Rows[0]["UserName"].ToString() + ","; ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",", CanAddStr); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",", CanAddStr); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",", CanModStr); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("," + ZWL.Common.PublicMethod.GetSessionValue("UserName") + ",", CanDelStr); } } }
public void DataBindToGridview() { GVData.PageSize = AspNetPager1.PageSize; GVData.PageIndex = AspNetPager1.CurrentPageIndex - 1; DataSet ds = new DataSet(); string DirID = "0"; try { DirID = Request.QueryString["DirID"].ToString(); } catch { } ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList(); if (Request.QueryString["Type"].ToString().Trim() == "个人文件") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|046n|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|046a|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|046m|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|046d|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|046e|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ds = MyModel.GetList("DirID=" + DirID + " and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and UserName='******' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "电子刊物") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|047n|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|047a|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|047m|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|047d|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|047e|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ds = MyModel.GetList("DirID=" + DirID + " and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "单位文件") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|048n|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|048a|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|048m|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|048d|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|048e|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ds = MyModel.GetList("DirID=" + DirID + " and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "共享文件") { if (DirID == "0") { ds = MyModel.GetList("TypeName='个人文件' and IFDel='否' and IfShare='是' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else { ds = MyModel.GetList("DirID=" + DirID + " and TypeName='个人文件' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } //隐藏添加、修改、删除 this.ImageButton1.Visible = false; this.ImageButton2.Visible = false; this.ImageButton3.Visible = false; this.ImageButton5.Visible = false; this.ImageButton6.Visible = false; } else if (Request.QueryString["Type"].ToString().Trim() == "我的硬盘") { //设定按钮权限 ImageButton6.Visible = ZWL.Common.PublicMethod.StrIFIn("|050n|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton1.Visible = ZWL.Common.PublicMethod.StrIFIn("|050a|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton5.Visible = ZWL.Common.PublicMethod.StrIFIn("|050m|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton3.Visible = ZWL.Common.PublicMethod.StrIFIn("|050d|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ImageButton2.Visible = ZWL.Common.PublicMethod.StrIFIn("|050e|", ZWL.Common.PublicMethod.GetSessionValue("QuanXian")); ds = MyModel.GetList("DirID=" + DirID + " and TypeName='" + Request.QueryString["Type"].ToString().Trim() + "' and IFDel='否' and UserName='******' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else if (Request.QueryString["Type"].ToString().Trim() == "共享硬盘") { if (DirID == "0") { ds = MyModel.GetList("TypeName='我的硬盘' and IFDel='否' and IfShare='是' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } else { ds = MyModel.GetList("DirID=" + DirID + " and TypeName='我的硬盘' and IFDel='否' and FileName Like '%" + this.TextBox1.Text + "%' order by DirOrFile desc,ID desc"); } //隐藏添加、修改、删除 this.ImageButton1.Visible = false; this.ImageButton2.Visible = false; this.ImageButton3.Visible = false; this.ImageButton5.Visible = false; this.ImageButton6.Visible = false; } GVData.DataSource = ds; GVData.DataBind(); AspNetPager1.RecordCount = ds.Tables[0].Rows.Count; }