Beispiel #1
0
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     try
     {
         for (int i = 0; i < gvFile.Rows.Count; i++)
         {
             CheckBox ckb = gvFile.Rows[i].FindControl("ckbChoose") as CheckBox;
             if (ckb.Checked == true)
             {
                 int fileid = Convert.ToInt32(gvFile.DataKeys[i].Value);
                 CanYou.OA.BLL.FileInfo file = new CanYou.OA.BLL.FileInfo(fileid);
                 DeleteFile(file.FileName);
                 file.Delete();
                 CanYou.OA.BLL.FileInfo.DelFileEmployee(fileid);
                 if (MessageInfo.IsMessageOfFile(file.FileId.ToString()))
                 {
                     //删除消息
                     MessageInfo.DelMessageOfMemo(fileid.ToString());
                 }
             }
         }
         gvDataBind();
     }
     catch (Exception Ex)
     {
         ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('错误信息:" + Ex.Message + "');", true);
     }
 }
Beispiel #2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (IsPageValid())
            {
                try
                {
                    EmployeeInfo em = (EmployeeInfo)Session["Employee"];

                    int             id = Convert.ToInt32(Request["BusinessExpId"].ToString());
                    BusinessExpInfo be = new BusinessExpInfo(id);

                    be.IsApply1 = 1;
                    be.SignName = 2;
                    DateTime dt = DateTime.Now;
                    be.Apply1Time = dt;
                    if (rblOver.Items[0].Selected)
                    {
                        be.IsOver1     = 0;
                        be.IsNewCreate = 1;
                        be.Save();
                        MessageInfo.DelMessageOfMemo(id.ToString());
                    }
                    else
                    {
                        be.IsOver1 = 1;
                        be.Save();
                    }
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('保存成功!');</script>");
                }
                catch (Exception Ex)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('保存失败:" + Ex.Message + "');", true);
                }
            }
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int fileid = Int32.Parse(Request.QueryString["fileid"]);//获取文件的ID

            if (MessageInfo.IsMessageOfFile(fileid.ToString()))
            {
                //删除消息
                MessageInfo.DelMessageOfMemo(fileid.ToString());
            }

            CanYou.OA.BLL.FileInfo file = new CanYou.OA.BLL.FileInfo(fileid);
            string fileName             = file.FileName;

            file.IsMsg = 1;
            file.Save();

            // Response.Redirect("~/ShareManage/RecvFile.aspx");

            //获取桌面路径
            //string DeskPath = Convert.ToString(System.Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory));
            //string DeskPath=Server.MapPath("~\\Files");
            DownLoads(fileName);
        }
Beispiel #4
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (IsPageValid())
            {
                try
                {
                    int            opid = Convert.ToInt32(Request["OfferPriceId"].ToString());
                    OfferPriceInfo op   = new OfferPriceInfo(opid);
                    op.MangerView = txtManagerView.Text.ToString();

                    op.IsApply2 = 1;
                    DateTime date = DateTime.Now;
                    op.Apply2Time = date;
                    op.IsSignName = 2;
                    if (rblOver.Items[0].Selected)
                    {
                        op.IsOver2     = 0;
                        op.IsNewCreate = 1;
                        op.Save();
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('ÄúÈÃÉêÇëÈËÐÞÕý£¡');</script>");
                        MessageInfo.DelMessageOfMemo(opid.ToString());
                    }
                    else if (rblOver.Items[1].Selected)
                    {
                        op.IsOver2 = 1;
                        op.Save();
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('±£´æ³É¹¦£¡');</script>");
                        MessageInfo.DelMessageOfMemo(opid.ToString());
                    }
                }
                catch (Exception Ex)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('±£´æʧ°Ü£º" + Ex.Message + "');", true);
                }
            }
        }
Beispiel #5
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                try
                {
                    int            opid = Convert.ToInt32(Request["OfferPriceId"].ToString());
                    OfferPriceInfo op   = new OfferPriceInfo(opid);

                    op.IsApply1 = 1;
                    DateTime date = DateTime.Now;
                    op.Apply1Time = date;
                    MessageInfo.DelMessageOfMemo(opid.ToString());
                    if (rblOver.Items[0].Selected)
                    {
                        op.IsOver1     = 0;
                        op.IsNewCreate = 1;
                        op.Save();
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('ÄúÈÃÉêÇëÈËÐÞÕý£¡');</script>");
                    }
                    else if (rblOver.Items[1].Selected)
                    {
                        op.IsOver1 = 1;
                        //int emid = Convert.ToInt32(Common.getEmployeeIdOfManager());
                        //op.Recv2EmployeeId = emid;
                        op.Save();
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('ÉóÅúͨ¹ý£¡');</script>");
                    }
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('±£´æ³É¹¦£¡');</script>");
                }
                catch (Exception Ex)
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('±£´æʧ°Ü£º" + Ex.Message + "');", true);
                }
            }
        }