protected void btnSubmit_Click(object sender, EventArgs e) { int DsScoreId = Convert.ToInt32(((Button)sender).CommandArgument.ToString()); DriverScoreInfo ds = new DriverScoreInfo(DsScoreId); ds.IsSubmit = 1; int recvid = Convert.ToInt32(Common.getEmployeeIdOfAdmin()); EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(ds.EmployeeId)); EmployeeInfo ems = new EmployeeInfo(recvid); MessageInfo.Msgs1(recvid, ds.DriverScoreId, "~/Score/DriveScoreApprove.aspx", em.EmployeeName + "绩效考核申请", em.EmployeeName, "daiban", em.EmployeeName + "绩效考核申请"); MessageInfo.SendMail(ems.Qq, "绩效考核申请", em.EmployeeName + "绩效考核申请"); ds.Save(); gvDataBind(); }
protected void btnSubmit_Click(object sender, EventArgs e) { int TechMaScoreId = Convert.ToInt32(((Button)sender).CommandArgument.ToString()); TechMaScoreInfo tms = new TechMaScoreInfo(TechMaScoreId); tms.IsSubmit = 1; int recvid = Convert.ToInt32(Common.getEmployeeIdOfManager()); EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(tms.EmployeeId)); EmployeeInfo ems = new EmployeeInfo(recvid); MessageInfo.Msgs1(recvid, tms.TechMaScoreId, "~/Score/TechMaScoreApprove.aspx", em.EmployeeName + "绩效考核申请", em.EmployeeName, "daiban", em.EmployeeName + "绩效考核申请"); //MessageInfo.SendMail(ems.Qq, "绩效考核申请", em.EmployeeName + "绩效考核申请"); tms.Save(); gvDataBind(); }
protected void btnSubmit_Click(object sender, EventArgs e) { int AsScoreId = Convert.ToInt32(((Button)sender).CommandArgument.ToString()); AssistantScoreInfo at = new AssistantScoreInfo(AsScoreId); at.IsSubmit = 1; int recvid = Convert.ToInt32(Common.getEmployeeIdOfMarketManager()); EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(at.EmployeeId)); EmployeeInfo ems = new EmployeeInfo(recvid); MessageInfo.Msgs1(recvid, at.AssistantScoreId, "~/Score/AsistantScoreApprove.aspx", em.EmployeeName + "绩效考核申请", em.EmployeeName, "daiban", em.EmployeeName + "绩效考核申请"); MessageInfo.SendMail(ems.Qq, "绩效考核申请", em.EmployeeName + "绩效考核申请"); at.Save(); gvDataBind(); }
protected void btnSubmit_Click(object sender, EventArgs e) { int BasEmScoreId = Convert.ToInt32(((Button)sender).CommandArgument.ToString()); BasEmScoreInfo bas = new BasEmScoreInfo(BasEmScoreId); bas.IsSubmit = 1; int recvid = Convert.ToInt32(Common.getEmployeeIdOfMarketManager()); EmployeeInfo em = new EmployeeInfo(Convert.ToInt32(bas.EmployeeId)); EmployeeInfo ems = new EmployeeInfo(recvid); MessageInfo.Msgs1(recvid, bas.BasEmScoreId, "~/Score/BASEmApprove.aspx", em.EmployeeName + "绩效考核申请", em.EmployeeName, "daiban", em.EmployeeName + "绩效考核申请"); MessageInfo.SendMail(ems.Qq, "绩效考核申请", em.EmployeeName + "绩效考核申请"); bas.Save(); gvDataBind(); }
protected void btnSendFile_Click(object sender, EventArgs e) { if (IsPageValid()) { try { int emid = Convert.ToInt32(Session["EmployeeId"]); EmployeeInfo em = (EmployeeInfo)Session["Employee"]; //获取文件名 string name = this.UpFile.FileName; DateTime sendtime = DateTime.Now; if (!CanYou.OA.BLL.FileInfo.IsDocumentSame(name)) { CanYou.OA.BLL.FileInfo file = new CanYou.OA.BLL.FileInfo(); file.FileName = name; file.FileTypeId = Convert.ToInt32(ddlFileType.SelectedValue.ToString()); file.SendEmployeeId = emid; file.Memo = txtMemo.Text.ToString(); file.SendTime = sendtime; file.IsCommon = 1; file.FilePermissionId = Convert.ToInt32(ddlFilePermit.SelectedValue); file.Save(); if (ddlFilePermit.SelectedItem.Text.ToString() == "公用") { DataTable EmTb = MessageInfo.getEmployeeId(emid); string[] strto = new String[EmTb.Rows.Count]; for (int i = 0; i < EmTb.Rows.Count; i++) { MessageInfo.Msgs1(Convert.ToInt32(EmTb.Rows[i]["EmployeeId"]), file.FileId, "~/ShareManage/DownloadDocument.aspx", "您有共享文档:" + name, em.EmployeeName, "daiyue", name); EmployeeInfo ems = new EmployeeInfo(Convert.ToInt32(EmTb.Rows[i]["EmployeeId"])); strto[i] = ems.Qq.ToString(); } //MessageInfo.SendMailS(strto, "OA新的消息", "您有共享文档:"+name); DataTable dt = MessageInfo.getEmployeeId1(); for (int j = 0; j < dt.Rows.Count; j++) { FileEmployeeInfo fileem = new FileEmployeeInfo(); fileem.FileId = file.FileId; fileem.EmployeeId = Convert.ToInt32(dt.Rows[j]["EmployeeId"]); fileem.IsMsg = 0; fileem.IsDelete = 0; fileem.Save(); } } else { DataTable EmTb = MessageInfo.getEmployeeIdOf(emid, ddlFilePermit.SelectedItem.Text.ToString()); string[] strto = new String[EmTb.Rows.Count]; for (int i = 0; i < EmTb.Rows.Count; i++) { MessageInfo.Msgs1(Convert.ToInt32(EmTb.Rows[i]["EmployeeId"]), file.FileId, "~/ShareManage/DownloadDocument.aspx", "您有共享文档:" + name, em.EmployeeName, "daiyue", name); EmployeeInfo ems = new EmployeeInfo(Convert.ToInt32(EmTb.Rows[i]["EmployeeId"])); strto[i] = ems.Qq.ToString(); } MessageInfo.SendMailS(strto, "OA新的消息", "您有共享文档:" + name); DataTable dt = MessageInfo.getEmployeeIdOf1(ddlFilePermit.SelectedItem.Text.ToString()); { for (int j = 0; j < dt.Rows.Count; j++) { FileEmployeeInfo fileem = new FileEmployeeInfo(); fileem.FileId = file.FileId; fileem.EmployeeId = Convert.ToInt32(dt.Rows[j]["EmployeeId"]); fileem.IsMsg = 0; fileem.IsDelete = 0; fileem.Save(); } } } //文件上传地址根目录,这里通过IIS架设本地主机为FTP服务器 //string FileSaveUri = @"ftp://192.168.11.70/www/Files/Documents/"; ////FTP用户名密码,就是本机的用户名密码 //string ftpUser = "******"; //string ftpPassWord = "******"; //SendFiles(FileSaveUri, ftpUser, ftpPassWord); this.UpFile.PostedFile.SaveAs(Server.MapPath("~/Files/Documents/" + UpFile.FileName)); Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('上传成功!');</script>"); } else { Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('该文档名已存在,请重命名!');</script>"); } } catch (Exception ex) { ClientScript.RegisterStartupScript(this.GetType(), "Save", "alert('上传失败:" + ex.Message + "');", true); } } }