Пример #1
0
        private void MailSend_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.Hide();
            MeetingConsole3 frm = new MeetingConsole3();

            frm.Show();
        }
        private void buttonMeetingInvitation_Click(object sender, EventArgs e)
        {
            this.Hide();
            MeetingConsole3 frm = new MeetingConsole3();

            frm.Show();
        }
Пример #3
0
        private void GetBody()
        {
            MeetingConsole3 frm55 = new MeetingConsole3();

            con = new SqlConnection(cs.DBConn);
            con.Open();
            string query = "Select MeetingDate From Meeting where Meeting.MeetingId='" + meetingId22 + "' ";

            cmd = new SqlCommand(query, con);
            rdr = cmd.ExecuteReader();
            if (rdr.Read())
            {
                dateTimeYears = (rdr.GetDateTime(0));
            }

            dateValue = dateTimeYears.ToString("yyyy-MMMM-dd");
            timeValue = dateTimeYears.ToString("HH:mm");
            con       = new SqlConnection(cs.DBConn);
            con.Open();
            string query2 =
                "SELECT  AddressHeader.AHeaderName, CompanyAddresses.HouseNo, CompanyAddresses.RoadNo, CompanyAddresses.Area, Thanas.Thana, Districts.District, Divisions.Division,CompanyAddresses.PostOfficeId FROM   Meeting INNER JOIN AddressHeader ON Meeting.AHeaderId = AddressHeader.AHeaderId INNER JOIN CompanyAddresses ON AddressHeader.AHeaderId = CompanyAddresses.AHeaderId INNER JOIN PostOffice ON CompanyAddresses.PostOfficeId = PostOffice.PostOfficeId INNER JOIN Thanas ON PostOffice.T_ID = Thanas.T_ID INNER JOIN  Districts ON Thanas.D_ID = Districts.D_ID INNER JOIN  Divisions ON Districts.Division_ID = Divisions.Division_ID where Meeting.MeetingId='" +
                meetingId22 + "' ";

            cmd = new SqlCommand(query2, con);
            rdr = cmd.ExecuteReader();
            if (rdr.Read())
            {
                addHeader = (rdr.GetString(0));
                hNo       = (rdr.GetString(1));
                rNo       = (rdr.GetString(2));
                area      = (rdr.GetString(3));
                thana     = (rdr.GetString(4));
                dist      = (rdr.GetString(5));
                division  = (rdr.GetString(6));
                psId      = (rdr.GetInt32(7));
            }

            txtBody.Text = "Notice is hereby given to you that the " + meetingTitle + " of the Company will be held on " +
                           dateValue + " at " + timeValue + " am in " + addHeader + ",House-" + hNo + ",Road-" + rNo +
                           ", " + area + ", " + thana + "," + division + ":" + psId + " ";
        }