Example #1
0
    protected void Del_Btn(object obj, EventArgs e)
    {
        LinkButton        linkButton        = obj as LinkButton;
        RepeaterItem      repeaterItem      = linkButton.Parent as RepeaterItem;
        HtmlInputCheckBox htmlInputCheckBox = repeaterItem.FindControl("chk") as HtmlInputCheckBox;
        int id = Convert.ToInt32(htmlInputCheckBox.Value);

        Meeting.Init().Delete(id);
        this.Show();
    }
Example #2
0
 protected void Del_All(object sender, EventArgs e)
 {
     foreach (RepeaterItem repeaterItem in this.rpt.Items)
     {
         HtmlInputCheckBox htmlInputCheckBox = repeaterItem.FindControl("chk") as HtmlInputCheckBox;
         if (htmlInputCheckBox.Checked)
         {
             int id = Convert.ToInt32(htmlInputCheckBox.Value);
             Meeting.Init().Delete(id);
         }
     }
     this.Show();
 }
Example #3
0
    private void Show(string mid)
    {
        MeetingInfo byId = Meeting.Init().GetById(Convert.ToInt32(mid));

        this.ViewState["mi"]     = byId;
        this.Bodys.Value         = byId.Bodys;
        this.CTime.Value         = byId.CTime;
        this.Address.Value       = byId.Address;
        this.Recorder.Value      = byId.Recorder;
        this.ListPerson.Value    = byId.ListPerson;
        this.AbsencePerson.Value = byId.AbsencePerson;
        this.Chaired.Value       = byId.Chaired;
        this.MainTopics.Value    = byId.MainTopics;
        this.Remarks.Value       = byId.Remarks;
        if (!string.IsNullOrEmpty(byId.FilePath) && byId.FilePath.Contains("|"))
        {
            this.Attachword.Visible = true;
            List <TmpInfo> list  = new List <TmpInfo>();
            string[]       array = byId.FilePath.Split(new char[]
            {
                '|'
            });
            for (int i = 0; i < array.Length; i++)
            {
                if (array[i].Trim() != "")
                {
                    TmpInfo tmpInfo = new TmpInfo();
                    int     num     = array[i].LastIndexOf('/') + 1;
                    string  tmp     = array[i].Substring(num, array[i].Length - num);
                    string  tmp2    = array[i].Replace("~", "");
                    tmpInfo.Tmp1 = array[i];
                    tmpInfo.Tmp2 = tmp;
                    tmpInfo.Tmp3 = tmp2;
                    list.Add(tmpInfo);
                }
            }
            this.rpt.DataSource = list;
            this.rpt.DataBind();
        }
    }
Example #4
0
 protected void Save_Btn(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(base.Request.QueryString["mid"]))
     {
         MeetingInfo meetingInfo = this.ViewState["mi"] as MeetingInfo;
         meetingInfo.AbsencePerson = this.AbsencePerson.Value;
         meetingInfo.Address       = this.Address.Value;
         meetingInfo.Bodys         = this.Bodys.Value;
         meetingInfo.Chaired       = this.Chaired.Value;
         meetingInfo.CTime         = this.CTime.Value;
         meetingInfo.FilePath      = this.UpdateFiles();
         meetingInfo.ListPerson    = this.ListPerson.Value;
         meetingInfo.MainTopics    = this.MainTopics.Value;
         meetingInfo.Recorder      = this.Recorder.Value;
         meetingInfo.Remarks       = this.Remarks.Value;
         meetingInfo.UserID        = Convert.ToInt32(this.Uid);
         Meeting.Init().Update(meetingInfo);
         string str = HttpContext.Current.Server.HtmlEncode("您好!会议已保存成功!");
         base.Response.Redirect("~/InfoTip/Operate_Success.aspx?returnpage=../Manage/common/Meeting_List.aspx&tip=" + str);
     }
     else
     {
         MeetingInfo meetingInfo = new MeetingInfo();
         meetingInfo.AbsencePerson = this.AbsencePerson.Value;
         meetingInfo.Address       = this.Address.Value;
         meetingInfo.Bodys         = this.Bodys.Value;
         meetingInfo.Chaired       = this.Chaired.Value;
         meetingInfo.CTime         = this.CTime.Value;
         meetingInfo.FilePath      = this.UpdateFiles();
         meetingInfo.ListPerson    = this.ListPerson.Value;
         meetingInfo.MainTopics    = this.MainTopics.Value;
         meetingInfo.Recorder      = this.Recorder.Value;
         meetingInfo.Remarks       = this.Remarks.Value;
         meetingInfo.UserID        = Convert.ToInt32(this.Uid);
         Meeting.Init().Add(meetingInfo);
         string str = HttpContext.Current.Server.HtmlEncode("您好!会议已保存成功!");
         base.Response.Redirect("~/InfoTip/Operate_Success.aspx?returnpage=../Manage/common/Meeting_List.aspx&tip=" + str);
     }
 }
Example #5
0
		private void Show()
		{
			if (!string.IsNullOrEmpty(this.Uid))
			{
				SqlParameter sqlParameter = new SqlParameter();
				sqlParameter.ParameterName = "@uid";
				sqlParameter.Size = 4;
				sqlParameter.Value = Convert.ToInt32(this.Uid);
				SqlParameter sqlParameter2 = new SqlParameter();
				sqlParameter2.Direction = ParameterDirection.Output;
				sqlParameter2.ParameterName = "@pt0";
				sqlParameter2.Size = 4;
				SqlParameter sqlParameter3 = new SqlParameter();
				sqlParameter3.Direction = ParameterDirection.Output;
				sqlParameter3.ParameterName = "@pt1";
				sqlParameter3.Size = 4;
				SqlParameter sqlParameter4 = new SqlParameter();
				sqlParameter4.Direction = ParameterDirection.Output;
				sqlParameter4.ParameterName = "@pt2";
				sqlParameter4.Size = 4;
				SqlParameter sqlParameter5 = new SqlParameter();
				sqlParameter5.Direction = ParameterDirection.Output;
				sqlParameter5.ParameterName = "@pt3";
				sqlParameter5.Size = 4;
				SqlParameter sqlParameter6 = new SqlParameter();
				sqlParameter6.Direction = ParameterDirection.Output;
				sqlParameter6.ParameterName = "@pt4";
				sqlParameter6.Size = 4;
				SqlParameter[] cmdParms = new SqlParameter[]
				{
					sqlParameter2,
					sqlParameter3,
					sqlParameter4,
					sqlParameter5,
					sqlParameter6,
					sqlParameter
				};
				MsSqlOperate.ExecuteNonQuery(CommandType.StoredProcedure, "Mails_GetAllMailBoxCount", cmdParms);
				this.sjx.InnerText = sqlParameter2.Value + "/" + sqlParameter6.Value;
				this.cgx.InnerText = string.Concat(sqlParameter3.Value);
				this.fjx.InnerText = string.Concat(sqlParameter4.Value);
				this.ljx.InnerText = string.Concat(sqlParameter5.Value);
				if (!string.IsNullOrEmpty(base.Request.QueryString["mid"]))
				{
					string value = base.Request.QueryString["mid"];
					MailsInfo byId = Mails.Init().GetById(Convert.ToInt32(value));
					if (byId.ReceiverID == Convert.ToInt32(this.Uid) || byId.SenderID == Convert.ToInt32(this.Uid))
					{
						Mails_DetailInfo byId2 = Mails_Detail.Init().GetById(byId.did);
						this.Subject.Value = "回复:" + byId.Subject;
						this.userlist.Value = string.Concat(new object[]
						{
							byId.SenderRealName,
							"#",
							byId.SenderID,
							"#",
							byId.SenderDepName,
							","
						});
						this.namelist.Value = byId.SenderRealName + "(" + byId.SenderDepName + "),";
						this.Bodys.Value = string.Concat(new string[]
						{
							"<br><br><br><span style='font-weight:bold;color:#999999'>",
							byId.SenderRealName,
							" (",
							byId.SenderDepName,
							") 在 ",
							Utils.ConvertDate2(byId.SendTime),
							" 写道: </span><br>",
							byId2.Bodys
						});
						if (!string.IsNullOrEmpty(byId2.Attachments) && byId2.Attachments.Contains("|"))
						{
							this.Attachword.Visible = true;
							List<TmpInfo> list = new List<TmpInfo>();
							string[] array = byId2.Attachments.Split(new char[]
							{
								'|'
							});
							for (int i = 0; i < array.Length; i++)
							{
								if (array[i].Trim() != "")
								{
									TmpInfo tmpInfo = new TmpInfo();
									int num = array[i].LastIndexOf('/') + 1;
									string tmp = array[i].Substring(num, array[i].Length - num);
									string tmp2 = array[i].Replace("~", "");
									tmpInfo.Tmp1 = array[i];
									tmpInfo.Tmp2 = tmp;
									tmpInfo.Tmp3 = tmp2;
									list.Add(tmpInfo);
								}
							}
							this.rpt.DataSource = list;
							this.rpt.DataBind();
						}
					}
				}
				if (!string.IsNullOrEmpty(base.Request.QueryString["cid"]))
				{
					string value2 = base.Request.QueryString["cid"];
					MailsInfo byId = Mails.Init().GetById(Convert.ToInt32(value2));
					if (byId.ReceiverID == Convert.ToInt32(this.Uid) || byId.SenderID == Convert.ToInt32(this.Uid))
					{
						Mails_DetailInfo byId2 = Mails_Detail.Init().GetById(byId.did);
						this.Subject.Value = byId.Subject;
						if (!string.IsNullOrEmpty(byId2.SendIDs) && !string.IsNullOrEmpty(byId2.SendRealNames))
						{
							this.userlist.Value = byId2.SendIDs;
							this.namelist.Value = byId2.SendRealNames;
						}
						if (!string.IsNullOrEmpty(byId2.CcIDs) && !string.IsNullOrEmpty(byId2.CcRealNames))
						{
							this.userlist_cc.Value = byId2.CcIDs;
							this.namelist_cc.Value = byId2.CcRealNames;
						}
						if (!string.IsNullOrEmpty(byId2.BccIDs) && !string.IsNullOrEmpty(byId2.BccRealNames))
						{
							this.userlist_bcc.Value = byId2.BccIDs;
							this.namelist_bcc.Value = byId2.BccRealNames;
						}
						this.Bodys.Value = byId2.Bodys;
						if (!string.IsNullOrEmpty(byId2.Attachments) && byId2.Attachments.Contains("|"))
						{
							this.Attachword.Visible = true;
							List<TmpInfo> list = new List<TmpInfo>();
							string[] array = byId2.Attachments.Split(new char[]
							{
								'|'
							});
							for (int i = 0; i < array.Length; i++)
							{
								if (array[i].Trim() != "")
								{
									TmpInfo tmpInfo = new TmpInfo();
									int num = array[i].LastIndexOf('/') + 1;
									string tmp = array[i].Substring(num, array[i].Length - num);
									string tmp2 = array[i].Replace("~", "");
									tmpInfo.Tmp1 = array[i];
									tmpInfo.Tmp2 = tmp;
									tmpInfo.Tmp3 = tmp2;
									list.Add(tmpInfo);
								}
							}
							this.rpt.DataSource = list;
							this.rpt.DataBind();
						}
					}
				}
				if (!string.IsNullOrEmpty(base.Request.QueryString["zid"]))
				{
					string value2 = base.Request.QueryString["zid"];
					MailsInfo byId = Mails.Init().GetById(Convert.ToInt32(value2));
					if (byId.ReceiverID == Convert.ToInt32(this.Uid) || byId.SenderID == Convert.ToInt32(this.Uid))
					{
						Mails_DetailInfo byId2 = Mails_Detail.Init().GetById(byId.did);
						this.Subject.Value = "转发:" + byId.Subject;
						this.Bodys.Value = "<br><br>" + byId2.Bodys;
						if (!string.IsNullOrEmpty(byId2.Attachments) && byId2.Attachments.Contains("|"))
						{
							this.Attachword.Visible = true;
							List<TmpInfo> list = new List<TmpInfo>();
							string[] array = byId2.Attachments.Split(new char[]
							{
								'|'
							});
							for (int i = 0; i < array.Length; i++)
							{
								if (array[i].Trim() != "")
								{
									TmpInfo tmpInfo = new TmpInfo();
									int num = array[i].LastIndexOf('/') + 1;
									string tmp = array[i].Substring(num, array[i].Length - num);
									string tmp2 = array[i].Replace("~", "");
									tmpInfo.Tmp1 = array[i];
									tmpInfo.Tmp2 = tmp;
									tmpInfo.Tmp3 = tmp2;
									list.Add(tmpInfo);
								}
							}
							this.rpt.DataSource = list;
							this.rpt.DataBind();
						}
					}
				}
				if (!string.IsNullOrEmpty(base.Request.QueryString["meeting"]))
				{
					MeetingInfo byId3 = Meeting.Init().GetById(Convert.ToInt32(base.Request.QueryString["meeting"]));
					string format = "<br><br><table style='width:95%;' border='1' cellspacing='0' bordercolor='#c0bdbd' cellpadding='2'><tbody><tr><td style='width:95px;color:#222;font-weight:bold;'>&nbsp;会议主题:</td><td>{0}</td></tr><tr><td style='color:#222;font-weight:bold;'>&nbsp;时间/地点:</td><td>{1}</td></tr><tr><td style='color:#222;font-weight:bold;'>&nbsp;会议主持:</td><td>{2}</td></tr><tr><td style='color:#222;font-weight:bold;'>&nbsp;记录人员:</td><td>{3}</td></tr><tr><td style='color:#222;font-weight:bold;'>会议参加者:</td><td>{4}</td></tr><tr><td style='color:#222;font-weight:bold;'>会议缺席者:</td><td>{5}</td></tr><tr><td style='color:#222;font-weight:bold;'>&nbsp;会议纪要:</td><td>{6}</td></tr><tr><td style='color:#222;font-weight:bold;'>&nbsp;备注:</td><td>{7}</td></tr></tbody></table><br>";
					this.Bodys.Value = string.Format(format, new object[]
					{
						byId3.MainTopics,
						byId3.CTime + " &nbsp; &nbsp; &nbsp; " + byId3.Address,
						byId3.Chaired,
						byId3.Recorder,
						byId3.ListPerson,
						byId3.AbsencePerson,
						byId3.Bodys,
						byId3.Remarks
					});
					if (!string.IsNullOrEmpty(byId3.FilePath) && byId3.FilePath.Contains("|"))
					{
						this.Attachword.Visible = true;
						List<TmpInfo> list = new List<TmpInfo>();
						string[] array = byId3.FilePath.Split(new char[]
						{
							'|'
						});
						for (int i = 0; i < array.Length; i++)
						{
							if (array[i].Trim() != "")
							{
								TmpInfo tmpInfo = new TmpInfo();
								int num = array[i].LastIndexOf('/') + 1;
								string tmp = array[i].Substring(num, array[i].Length - num);
								string tmp2 = array[i].Replace("~", "");
								tmpInfo.Tmp1 = array[i];
								tmpInfo.Tmp2 = tmp;
								tmpInfo.Tmp3 = tmp2;
								list.Add(tmpInfo);
							}
						}
						this.rpt.DataSource = list;
						this.rpt.DataBind();
					}
				}
				if (!string.IsNullOrEmpty(base.Request.QueryString["notebook"]))
				{
					NoteBookInfo byId4 = NoteBook.Init().GetById(Convert.ToInt32(base.Request.QueryString["notebook"]));
					string format2 = "<br><br><table style='width:95%;' border='1' cellspacing='0' bordercolor='#c0bdbd' cellpadding='2'><tbody><tr><td style='width:95px;color:#222;font-weight:bold;'>&nbsp;记事主题:</td><td>{0}</td></tr><tr><td style='width:95px;color:#222;font-weight:bold;'>&nbsp;记事时间:</td><td>{1}</td></tr><tr><td style='color:#222;font-weight:bold;'>&nbsp;记事内容:</td><td>{2}</td></tr><tr></tr></tbody></table><br>";
					this.Bodys.Value = string.Format(format2, byId4.Subject, Utils.ConvertDate3(byId4.AddTime), byId4.Bodys.Replace("\r\n", "<br>"));
				}
				if (!string.IsNullOrEmpty(base.Request.QueryString["privateaddr"]))
				{
					PhoneBookInfo byId5 = PhoneBook.Init().GetById(Convert.ToInt32(base.Request.QueryString["privateaddr"]));
					string format3 = "<br><br><table style='width:95%;' border='1' cellspacing='0' bordercolor='#c0bdbd' cellpadding='2'><tbody><tr><td style='width:95px;color:#222;font-weight:bold;'>&nbsp;姓名:</td><td>{0}</td></tr><tr><td style='color:#222;font-weight:bold;'>&nbsp;标签:</td><td>{1}</td></tr><tr></tr><tr><td style='color:#222;font-weight:bold;'>&nbsp;电话:</td><td>{2}</td></tr><tr></tr><tr><td style='color:#222;font-weight:bold;'>&nbsp;备注:</td><td>{3}</td></tr><tr></tr></tbody></table><br>";
					this.Bodys.Value = string.Format(format3, new object[]
					{
						byId5.Person,
						byId5.TagName,
						byId5.Phone,
						byId5.Notes.Replace("\r\n", "<br>")
					});
				}
			}
			else
			{
				base.Response.Write("<script>alert('会话已过期,请重新登录!');window.location='/InfoTip/Operate_Nologin.aspx?ReturnUrl=" + base.Request.Url.AbsoluteUri + "'</script>");
			}
		}