Sms IV Review

Embed Size (px)

Citation preview

  • 7/29/2019 Sms IV Review

    1/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    1

    Sample Screens

    Login Form

  • 7/29/2019 Sms IV Review

    2/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    2

    New User Creation

  • 7/29/2019 Sms IV Review

    3/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    3

    New User Add Msg

  • 7/29/2019 Sms IV Review

    4/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    4

    User Modification Form

  • 7/29/2019 Sms IV Review

    5/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    5

    User Deletion Form

  • 7/29/2019 Sms IV Review

    6/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    6

    Login Form

  • 7/29/2019 Sms IV Review

    7/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    7

    File Menu

  • 7/29/2019 Sms IV Review

    8/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    8

    User Entry

  • 7/29/2019 Sms IV Review

    9/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    9

    User Details Added Msg

  • 7/29/2019 Sms IV Review

    10/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    10

    Search Form

  • 7/29/2019 Sms IV Review

    11/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    11

    Report Master

  • 7/29/2019 Sms IV Review

    12/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    12

    Category Form

  • 7/29/2019 Sms IV Review

    13/27

  • 7/29/2019 Sms IV Review

    14/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    14

    Logout Form

  • 7/29/2019 Sms IV Review

    15/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    15

    2. Sample Codings

    using System;

    using System.Collections.Generic;

    using System.ComponentModel;

    using System.Data;

    using System.Drawing;

    using System.Linq;

    using System.Text;

    using System.Windows.Forms;

    using SMSManagement.DAL;

    using System.Configuration;

    using SMSClientLib;

    using System.Net;

    using System.Net.Mail;

    namespace SMS

    {

    public partial class UIMessage : Form

    {

    temp2 temp2success= new temp2();

    Categorylist listcatagorydal;

    string username = ConfigurationManager.AppSettings["username"];

    string password = ConfigurationManager.AppSettings["password"];

    bool atttachment = false;

    public UIMessage()

    {

    InitializeComponent();

    btnoffemail.Enabled = false;

    btnoffsms.Enabled = false ;

    grpSMS.Enabled = false;

  • 7/29/2019 Sms IV Review

    16/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    16

    grpSMS.BringToFront();

    lsttmep.Items.Clear();

    }

    private void btnoffemail_Click(object sender, EventArgs e)

    {

    if (radiooffEmail.Checked == false && radiooffSMS.Checked == false)

    {

    MessageBox.Show("Choose the Massage type");

    radiooffEmail.Focus();

    }

    sendmail();

    MessageBox.Show("E-Mail Sending Successfully");

    }

    private void radiooffSMS_CheckedChanged(object sender, EventArgs e)

    {

    if (radiooffSMS.Checked == true)

    {

    btnoffsms.Enabled = true;

    grpSMS.Enabled = true;

    grpSMS.Visible = true;

    grpMail.Visible = false;

    btnoffemail.Enabled = false;

    }

    }private void radiooffEmail_CheckedChanged(object sender, EventArgs e)

    {

    if (radiooffEmail.Checked == true)

    {

  • 7/29/2019 Sms IV Review

    17/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    17

    btnoffemail.Enabled = true;

    grpSMS.Enabled = false;

    grpMail.Visible = true;

    grpMail.Enabled = true;btnoffsms.Enabled = false;

    }

    }

    private void richtxtoffSMS_TextChanged(object sender, EventArgs e)

    {

    try

    {

    lblCount.Text = (140 - (richtxtoffSMS.TextLength)).ToString();

    }

    catch (Exception ex)

    {

    MessageBox.Show(ex.Message, "VTech", MessageBoxButtons.OK,

    MessageBoxIcon.Warning);

    }

    }

    private void btnAttach_Click(object sender, EventArgs e)

    {

    try

    {

    openFileDialog1.ShowDialog();atttachment = true;

    }

    catch (Exception ex)

    {

  • 7/29/2019 Sms IV Review

    18/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    18

    MessageBox.Show(ex.Message, "VTech", MessageBoxButtons.OK,

    MessageBoxIcon.Warning);

    }

    }

    private void btnoffsms_Click(object sender, EventArgs e)

    {

    if (radiooffEmail.Checked == false && radiooffSMS.Checked == false)

    {

    MessageBox.Show("Choose the Massage type");

    radiooffEmail.Focus();

    }

    sendsms1();

    }

    private void loadcategory()

    {

    try

    {

    for (int i = 0; i < (dtagcategory.Rows.Count) - 1; i++)

    {

    int count = 0;

    if (dtagcategory.Rows[i].Cells[0].Value != null &&

    ((bool)dtagcategory.Rows[i].Cells[0].Value == true)){

    count++;

    }

    if (count > 0)

  • 7/29/2019 Sms IV Review

    19/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    19

    {

    listcatagorydal = new Categorylist();

    DataTable table = new DataTable();

    string username = dtagcategory.Rows[i].Cells[1].Value.ToString();table = listcatagorydal.Getcatagory (username);

    if (table.Rows.Count > 0)

    {

    for (int x = 0; x < table.Rows.Count; x++)

    {

    temp2success.inserttemp2(table.Rows[x]["Usercode"].ToString(),

    table.Rows[x]["Username"].ToString(), table.Rows[x]["Resmobileno1"].ToString(),

    table.Rows[x]["offmobileno1"].ToString(), table.Rows[x]["Resemail"].ToString(),

    table.Rows[x]["offemail"].ToString());

    }

    }

    }

    }

    }

    catch (Exception ex)

    {

    MessageBox.Show(ex.Message, "VTech", MessageBoxButtons.OK,

    MessageBoxIcon.Warning);

    }

    }

    private void loadname(){

    try

    {

    DataTable table = new DataTable();

  • 7/29/2019 Sms IV Review

    20/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    20

    table = temp2success.Gettemp2disect();

    ListViewItem list = null;

    for (int i = 0; i < table.Rows.Count; i++)

    {DataRow row = table.Rows[i];

    list = new ListViewItem(row["Username"].ToString());

    lstsendlist.Items.Add(list);

    }

    }

    catch (Exception ex)

    {

    MessageBox.Show(ex.Message, "VTech", MessageBoxButtons.OK,

    MessageBoxIcon.Warning);

    }

    }

    private void sendmail()

    {

    try

    {

    DataTable table = new DataTable();

    table = temp2success.Gettemp2disect();

    for (int a = 0; a < table.Rows.Count; a++)

    {

    SmtpClient mail = new SmtpClient();

    MailMessage mess = new MailMessage();System.Net.Mail.Attachment attachment;

    mail.Credentials = new

    System.Net.NetworkCredential(ConfigurationManager.AppSettings["emailusername"],

    ConfigurationManager.AppSettings["emailpassword"]);

  • 7/29/2019 Sms IV Review

    21/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    21

    Int32 portno =

    Convert.ToInt32(ConfigurationManager.AppSettings["portno"]);

    mail.Port = portno;

    mail.Host = ConfigurationManager.AppSettings["smtp"];mail.EnableSsl = true;

    mess.From = new MailAddress("[email protected]");

    if (table.Rows[a]["offemail"].ToString() != "NA")

    {

    mess.To.Add(table.Rows[a]["offemail"].ToString());

    }

    mess.Subject = txtESub.Text;

    mess.Body = rchtxtMailMessage.Text;

    if (atttachment == true)

    {

    attachment = new

    System.Net.Mail.Attachment(openFileDialog1.FileName.ToString());

    mess.Attachments.Add(attachment);

    }

    mail.Send(mess);

    }

    temp2success.deletetemp2();

    }

    catch (Exception ex)

    {

    MessageBox.Show(ex.Message);

    }}

  • 7/29/2019 Sms IV Review

    22/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    22

    private void sendsms1()

    {

    try

    {if (richtxtoffSMS.Text == "")

    {

    MessageBox.Show("Messege Can't be Empty", "VTech",

    MessageBoxButtons.OK, MessageBoxIcon.Warning);

    }

    else

    {

    DataTable table = new DataTable();

    table = temp2success.Gettemp2disect();

    string status = "";

    CookieContainer cookie = SMSClientLib.Login.Connect(username,

    password, out status);

    string[] siteParameters = SMSClientLib.Login.GetSiteParameters(cookie);

    for (int a = 0; a < table.Rows.Count; a++)

    {

    if (rbtoffice.Checked == true)

    {

    if (table.Rows[a]["offphoneno1"].ToString() == "NA")

    {

    string temp = table.Rows[a]["Resmobileno1"].ToString();

    ListViewItem list = null;

    list = new ListViewItem(temp.ToString());lsttmep.Items.Add(list);

    }

    string mobno1 = table.Rows[a]["offphoneno1"].ToString();

  • 7/29/2019 Sms IV Review

    23/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    23

    string messageSentResult = SendSMS.Send_Processing(mobno1,

    richtxtoffSMS.Text, cookie, siteParameters);

    MessageBox.Show("Message sent successfully", mobno1);

    }if (rbtresdency.Checked == true)

    {

    if (table.Rows[a]["Resmobileno1"].ToString() == "NA")

    {

    string temp = table.Rows[a]["offphoneno1"].ToString();

    ListViewItem list = null;

    list = new ListViewItem(temp.ToString());

    lsttmep.Items.Add(list);

    }

    string mobno1 = table.Rows[a]["Resmobileno1"].ToString();

    string messageSentResult = SendSMS.Send_Processing(mobno1,

    richtxtoffSMS.Text, cookie, siteParameters);

    MessageBox.Show("Message sent successfully", mobno1);

    }

    }

    }

    lsttmep.Items[0].Remove();

    }

    catch (Exception ex)

    {MessageBox.Show(ex.Message);

    }

    }

  • 7/29/2019 Sms IV Review

    24/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    24

    private void btnremove_Click(object sender, EventArgs e)

    {

    loadcategory();loadname();

    //temp2success.deletetemp2username(lstsendlist.SelectedItems[0].Text.ToString());

    //lstsendlist.SelectedItems[0].Remove();

    }

    private void dtagcategory_CellMouseClick(object sender,

    DataGridViewCellMouseEventArgs e)

    {

    //loadcategory();

    //loadname();

    }

    }

    }

  • 7/29/2019 Sms IV Review

    25/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    25

    CONCLUSION

    The goal of the project SMS Based Advertisement successfully achieved. The

    implementation and testing has been done in a step-by-step process. Each module has

    been developed and tested individually to obtain the necessary required output in the

    desired form. The project has been done as user-friendly.

    The software developed has been designed and run to satisfy the requirements and

    needs of the organization as well as the end users. The system reduces the manual work

    of maintenance of the records. It has also resulted in quick retrieval and reference of

    required information, which is vital to the degrees of the organization.

    The entire system is documented and can be easily understood by the end users.

    The form are very user friendly and also easy to handle even by the beginners with very

    little effort and guidance

  • 7/29/2019 Sms IV Review

    26/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    26

    SCOPE IN FUTURE DEVELOPMENT

    The SMS Based Advertisement has been designed and developed flexibly

    according to the current requirements of the user. Since the requirements may increase in

    future, the system can be easily modified accordingly as the system has been

    modularized. The system is developed in such as that any future developments can be

    included.

    The future development may be made in the direction of making system as the

    decision support system. The Global viewer of the funds can be added in the future to

    integrate the project

    This project is mainly concentrates on maintaining the works on a fund. In this

    user area is maintained to view the user Details for the easy planning, my successor may

    plan to add Graphical Reports for billing like analyses Charts to show better visual of

    stock analysis

  • 7/29/2019 Sms IV Review

    27/27

    | SMS BASED ADVERTISEMENT MANAGEMENT

    27

    BIBILIOGRAPHY

    BOOKS

    1. FRANCESCO BALENA, Programming Microsoft Visual Basic .NETVersion 2005, BPB publications 2007 Edition

    2. BILL EVJEN, BILLY HOLLIS, ROCKFORD LHOTKA, AND TIM MCCARTHYProfessional VB.NET 2005, 3rd Edition

    3. ELIAS. M. AWAD, System Analysis and Design, Galgotia Publications 1997 Edition.

    4. JOYCE COX AND POLLY URBAN, Introduction to SQL Server 2000BPB publications 1998 Edition

    5. ROGER S.PRESSMAN. Software Engineering. Tata McGraw-Hill Publishingcompany, Vth Edition, 2001.

    6. D M DHAMDHERE. Systems Programming and Operating Systems.Tata McGraw-Hill Publishing Company, II Edition, 2002.

    7. Microsoft SQL Server 2000 UnleashedbyRay Rankins, Paul Bertucci, PaulJensen ISBN: 0672324679 Published by. Sams Publishing