- providerdesignpattern.zip
- PhoneBookProviders
- Application
- BusinessLogicLayer
- DataAccessLayer
- DataBase
- AhmedEid_PhoneBook.mdf
- AhmedEid_PhoneBook_log.ldf
- Framework
- bin
- Debug
- CompanyName.dll
- GetGroup.dll
- CompanyName.csproj
- Controls
- Libraries
- Properties
- Providers
- PhoneBook
- Provider01
- Provider02
- XML
- PhoneBook.sln
- PhoneBook.suo
- PhoneBook
- ReadMe.txt
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Configuration;
namespace CompanyName.PhoneBook.PhoneBookApplication
{
public partial class Main : Form
{
public Main()
{
InitializeComponent();
}
private void Main_Load(object sender, EventArgs e)
{
try
{
if (ConfigurationManager.ConnectionStrings["strcon"] != null)
{
txtStrcon.Text = ConfigurationManager.ConnectionStrings["strcon"].ToString();
}
}
catch (Exception ex) { MessageBox.Show(ex.ToString()); }//"Can't find connection string in app.config"); }
}
private void btnSave_Click(object sender, EventArgs e)
{
System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
if (config.AppSettings.Settings["strcon"] != null)
config.AppSettings.Settings["strcon"].Value = txtStrcon.Text.Trim();
else
config.AppSettings.Settings.Add("strcon", txtStrcon.Text.Trim());
MessageBox.Show("Saved successfully", "Successfully");
}
private void btnAddPerson_Click(object sender, EventArgs e)
{
AddPerson frmAddperson = new AddPerson(true,0);
frmAddperson.ShowDialog();
}
private void btnSerch_Click(object sender, EventArgs e)
{
AdvancedSearch frmSearch = new AdvancedSearch();
frmSearch.ShowDialog();
}
private void btnManageGroups_Click(object sender, EventArgs e)
{
ManageGroups frmManage = new ManageGroups();
frmManage.ShowDialog();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.