Beispiel #1
0
    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());
    }
Beispiel #2
0
    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());
    }
Beispiel #3
0
    protected void ImageButton1_Click(object sender, EventArgs e)
    {
        if (this.FileUpload1.FileName.Trim().Length > 0)
        {
            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.ID       = int.Parse(Request.QueryString["ID"].ToString());
                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.Update();

                //写系统日志
                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());
            }
        }
        else
        {
            ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList();
            MyModel.FileName = this.HyperLink1.Text;
            MyModel.ID       = int.Parse(Request.QueryString["ID"].ToString());
            MyModel.BianHao  = this.TextBox1.Text;
            MyModel.BackInfo = this.TxtContent.Text;
            MyModel.DaXiao   = int.Parse(this.Label1.Text);
            try
            {
                MyModel.FileType = this.Label2.Text;
            }
            catch
            { }
            MyModel.DirID          = int.Parse(Request.QueryString["DirID"].ToString());
            MyModel.ShangChuanTime = DateTime.Now;
            MyModel.FilePath       = this.Label3.Text;
            MyModel.UserName       = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            MyModel.IFDel          = "否";
            MyModel.TypeName       = Request.QueryString["Type"].ToString();
            MyModel.IfShare        = "否";
            MyModel.DirOrFile      = 0;
            MyModel.Update();

            //写系统日志
            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());
        }
    }
Beispiel #4
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        if (this.FileUpload1.FileName.Trim().Length > 0)
        {
            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.ID = int.Parse(Request.QueryString["ID"].ToString());
                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.Update();

                //写系统日志
                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());
            }
        }
        else
        {
            ZWL.BLL.ERPFileList MyModel = new ZWL.BLL.ERPFileList();
            MyModel.FileName = this.Label5.Text;
            MyModel.ID = int.Parse(Request.QueryString["ID"].ToString());
            MyModel.BianHao = this.TextBox1.Text;
            MyModel.BackInfo = this.TxtContent.Text;
            MyModel.DaXiao = int.Parse(this.Label1.Text);
            try
            {
                MyModel.FileType = this.Label2.Text;
            }
            catch
            { }
            MyModel.DirID = int.Parse(Request.QueryString["DirID"].ToString());
            MyModel.ShangChuanTime = DateTime.Now;
            MyModel.FilePath = this.Label3.Text;
            MyModel.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            MyModel.IFDel = "否";
            MyModel.TypeName = Request.QueryString["Type"].ToString();
            MyModel.IfShare = "否";
            MyModel.DirOrFile = 0;
            MyModel.Update();

            //写系统日志
            ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
            MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
            MyRiZhi.DoSomething = "用户修改文件信息(" + this.Label5.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());
        }
    }