Exemplo n.º 1
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     if (rblOver.SelectedIndex == -1)
     {
         Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('请选择修正或通过!');</script>");
     }
     else
     {
         try
         {
             int           fid = Convert.ToInt32(Request["FileApplyId"].ToString());
             FileApplyInfo fa  = new FileApplyInfo(fid);
             fa.DepartView = txtView.Text.ToString();
             if (rblOver.Items[0].Selected)
             {
                 fa.State = 5;
                 fa.Save();
                 Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('您让申请人修正!');</script>");
             }
             else if (rblOver.Items[1].Selected)
             {
                 fa.State = 4;
                 fa.Save();
                 Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('审批通过!');</script>");
             }
         }
         catch (Exception Ex)
         {
             ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('保存失败:" + Ex.Message + "');", true);
         }
     }
 }
Exemplo n.º 2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (UpFile.HasFile)
            {
                this.UpFile.PostedFile.SaveAs(Server.MapPath("~/Files/File/" + UpFile.FileName));
                FileOfApplyInfo ffa = new FileOfApplyInfo();
                ffa.FileOfName   = UpFile.FileName.ToString();
                ffa.PhysicalName = UpFile.PostedFile.FileName.ToString();
                ffa.Save();

                FileApplyInfo fa = new FileApplyInfo();
                fa.ApplyName     = lblEm.Text.ToString();
                fa.ApplyTime     = txtTime.Text.ToString();
                fa.DepartName    = Session["DepartName"].ToString();
                fa.DepartView    = txtSectionView.Text.ToString();
                fa.FileDes       = txtFileDes.Text.ToString();
                fa.FilesName     = txtFileName.Text.ToString();
                fa.FileType      = txtFileType.Text.ToString();
                fa.State         = 0;
                fa.FileOfApplyId = ffa.FileOfApplyId;
                fa.Save();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('新增成功,确认无误后需要您进一步提交!');</script>");
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('请上传文件!');</script>");
            }
        }
Exemplo n.º 3
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            int           fid = Convert.ToInt32(((Button)sender).CommandArgument.ToString());
            FileApplyInfo fa  = new FileApplyInfo(fid);

            fa.State = 3;
            fa.Save();
            gvDataBind();
        }
Exemplo n.º 4
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (UpFile.HasFile)
            {
                FileApplyInfo fa = new FileApplyInfo(Convert.ToInt32(Request["FileApplyId"].ToString()));

                FileOfApplyInfo ffa = new FileOfApplyInfo(Convert.ToInt32(fa.FileOfApplyId));
                ffa.FileOfName   = UpFile.FileName.ToString();
                ffa.PhysicalName = UpFile.PostedFile.FileName.ToString();
                ffa.Save();

                fa.ApplyTime  = txtTime.Text.ToString();
                fa.DepartView = txtSectionView.Text.ToString();
                fa.FileDes    = txtFileDes.Text.ToString();
                fa.FilesName  = txtFileName.Text.ToString();
                fa.FileType   = txtFileType.Text.ToString();
                fa.Save();
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('保存成功,确认无误后需要您进一步提交!');</script>");
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('请重新修改文件名并上传!');</script>");
            }
        }