Example #1
0
    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());
    }
Example #2
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs 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.CanView = txtCanView.Text;
        MyModel.CanAdd = txtCanAdd.Text;
        MyModel.CanMod = txtCanMod.Text;
        MyModel.CanDel = txtCanDel.Text;

        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());
    }
Example #3
0
    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());
        }
    }
Example #4
0
    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());
        }
    }