Tuesday, November 25, 2014

WPF C# ComboBox with DataBind

Step - 1 (XAML)

1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
       <ComboBox HorizontalAlignment="Left" Margin="168,54,0,0" VerticalAlignment="Top" Width="197" x:Name="cmbProductCat">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding CategoryTitle}" Width="60"/>
                        <!--<TextBlock Text="|"/>
                        <TextBlock Text="{Binding DepartmentName}" Width="60"/>-->

                    </StackPanel>
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>

Step - 2 (UI Code)
1
2
3
4
5
6
7
8
9
private void LoadProductCatComboBox()
        {
            cmbProductCat.Items.Clear();
            _productCategoryInfoList = _productCategoryInfoManager.LoadAllProductCategoryInfo();
            foreach (ProductCategoryInfo pCatInf in _productCategoryInfoList)
            {
                cmbProductCat.ItemsSource = _productCategoryInfoList;
            }
        }

Step - 3 (BLL)
1
2
3
4
public List<ProductCategoryInfo> LoadAllProductCategoryInfo()
        {
            return productCatInfoGetway.LoadAllProductCategoryInfo();
        }

Step -4 (DAL)

1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
public List<ProductCategoryInfo> LoadAllProductCategoryInfo()
        {
            List<ProductCategoryInfo> productCategoryInfoList = new List<ProductCategoryInfo>();

            foreach (var p in (from c in dataContext.tbl_ProductCategories select c).Distinct())
            {
                ProductCategoryInfo productCatInfoObj = new ProductCategoryInfo();
                productCatInfoObj.Id = p.ID;
                productCatInfoObj.CategoryTitle = p.CategoriesTitle;

                productCategoryInfoList.Add(productCatInfoObj);
            }
            return productCategoryInfoList;
        }

WPF C# Data Save, Update and Delete with 3 layer architecture - Part 4(UI) - Final Part

In this Final Part we will design our UI and complete our Save, Delete & Update operation.
Our Final UI will look like the image below.

Here is XAML code:

1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<Grid>
  <Grid.RowDefinitions>
   <RowDefinition/>
  </Grid.RowDefinitions>
  <Grid.ColumnDefinitions>
   <ColumnDefinition/>
  </Grid.ColumnDefinitions>

  <Button x:Name="btnNewCustomer" Content="New Customer" HorizontalAlignment="Left" Margin="572,646,0,0" Width="125" Height="30" Click="btnNewCustomer_Click" VerticalAlignment="Top"/>
  <Button x:Name="btnSaveCustomer" Content="Save Customer" HorizontalAlignment="Left" Margin="727,646,0,0" Width="125" Height="30" Click="btnSaveCustomer_Click" VerticalAlignment="Top"/>
  <Button x:Name="btnDeleteCustomer" Content="Delete Customer" HorizontalAlignment="Left" Margin="891,646,0,0" Width="125" Height="30" Click="btnDeleteCustomer_Click" VerticalAlignment="Top"/>
  <Button x:Name="btnClose" Content="Close" HorizontalAlignment="Left" Margin="1057,646,0,0" Width="125" Height="30" Click="btnClose_Click" VerticalAlignment="Top"/>
  <Label Content="Customer Information Form" HorizontalAlignment="Left" Margin="447,9,0,0" VerticalAlignment="Top" Background="{x:Null}" Foreground="#FF41B1E1" FontFamily="Lucida Calligraphy" FontSize="34" FontWeight="Bold" FontStyle="Italic" Width="642" Height="55"/>
  <GroupBox Header="Customer List" HorizontalAlignment="Left" Margin="378,70,0,0" VerticalAlignment="Top" Height="557" Width="957"/>
  <ListView 
   HorizontalAlignment="Left" 
   Height="473" 
   Margin="399,139,0,0" 
   VerticalAlignment="Top" 
   Width="921"
   x:Name="CustomerInfoListView" MouseDoubleClick="CustomerInfoListView_MouseDoubleClick">
   <ListView.ContextMenu>
    <ContextMenu x:Name="lstCustomerInfo" StaysOpen="True" Background="WhiteSmoke">
     <ContextMenu.BitmapEffect>
      <BitmapEffectGroup/>
     </ContextMenu.BitmapEffect>
     <MenuItem Header="Edit" x:Name="EditProgramContexMenu" Click="EditProgramContexMenu_Click"/>
     <MenuItem Header="Rmove" x:Name="RemoveProgramContexMenu" Click="RemoveProgramContexMenu_Click"/>
    </ContextMenu>
   </ListView.ContextMenu>
   <ListView.View>
    <GridView AllowsColumnReorder="True">
     <GridViewColumn DisplayMemberBinding="{Binding Id}" Header="" Width="0"/>
     <GridViewColumn DisplayMemberBinding="{Binding CustomerName}" Header="Customer Name" Width="220"/>
     <GridViewColumn DisplayMemberBinding="{Binding CustomerAddress}" Header="Customer Address" Width="280"/>
     <GridViewColumn DisplayMemberBinding="{Binding CustomerMobile}" Header="Customer Mobile Number" Width="160"/>
     <GridViewColumn DisplayMemberBinding="{Binding CustomerEmail}" Header="Customer Email Address" Width="220"/>
    </GridView>
   </ListView.View>
  </ListView>
  <Label Content="Search Customer :" HorizontalAlignment="Left" Margin="396,101,0,0" VerticalAlignment="Top"/>
        <TextBox x:Name="txtCustomerSearch" Controls:TextboxHelper.Watermark="Search by Name" Controls:TextboxHelper.ClearTextButton="True" HorizontalAlignment="Left" Height="23" Margin="514,105,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="160"/>
  <GroupBox Header="Customer Information" HorizontalAlignment="Left" Height="557" Margin="10,70,0,0" VerticalAlignment="Top" Width="363">
   <Grid HorizontalAlignment="Left" Height="514" Margin="0,0,-2,0" VerticalAlignment="Top" Width="353">
    <Label Content="Customer Name :" HorizontalAlignment="Left" Margin="6,3,0,0" VerticalAlignment="Top" Height="26" Width="102" Foreground="Black" Background="{x:Null}" FontFamily="Arial Unicode MS"/>
                <TextBox x:Name="txtCustomerName" Controls:TextboxHelper.Watermark="Kazi Obaydollah" Controls:TextboxHelper.ClearTextButton="True" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" VerticalAlignment="Top" Width="200" Margin="147,6,0,0" TextChanged="txtCustomerName_TextChanged"/>
    <Label Content="Customer Address :" HorizontalAlignment="Left" Margin="6,34,0,0" VerticalAlignment="Top" Foreground="Black" Background="{x:Null}" FontFamily="Arial Unicode MS" Height="26" Width="116"/>
                <TextBox x:Name="txtCustomerAddress" Controls:TextboxHelper.Watermark="Dhaka" Controls:TextboxHelper.ClearTextButton="True" HorizontalAlignment="Left" Height="75" Margin="147,37,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="200" AcceptsReturn="True"/>
    <Label Content="Phone Number :" HorizontalAlignment="Left" Margin="6,116,0,0" VerticalAlignment="Top" Foreground="Black" Background="{x:Null}" FontFamily="Arial Unicode MS" Height="26" Width="97"/>
                <TextBox x:Name="txtCustomerPhone" Controls:TextboxHelper.Watermark="12345678912" Controls:TextboxHelper.ClearTextButton="True" HorizontalAlignment="Left" Height="23" Margin="147,119,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="200"/>
    <Label Content="Mobile Number :" HorizontalAlignment="Left" Margin="6,147,0,0" VerticalAlignment="Top" Foreground="Black" Background="{x:Null}" FontFamily="Arial Unicode MS" Height="26" Width="98"/>
                <TextBox x:Name="txtCustomerMobile" Controls:TextboxHelper.Watermark="12345678912" Controls:TextboxHelper.ClearTextButton="True" HorizontalAlignment="Left" Height="23" Margin="147,150,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="200"/>
    <Label Content="FAX Number :" HorizontalAlignment="Left" Margin="6,178,0,0" VerticalAlignment="Top" Foreground="Black" Background="{x:Null}" FontFamily="Arial Unicode MS" Height="26" Width="86"/>
                <TextBox x:Name="txtCustomerFax" Controls:TextboxHelper.Watermark="12345678912" Controls:TextboxHelper.ClearTextButton="True" HorizontalAlignment="Left" Height="23" Margin="147,181,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="200"/>
    <Label Content="Email Address :" HorizontalAlignment="Left" Margin="6,209,0,0" VerticalAlignment="Top" Foreground="Black" Background="{x:Null}" FontFamily="Arial Unicode MS" Height="26" Width="94"/>
                <TextBox x:Name="txtCustomerEmail" Controls:TextboxHelper.Watermark="info@4ditsolution.com" Controls:TextboxHelper.ClearTextButton="True" HorizontalAlignment="Left" Height="23" Margin="147,212,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="200"/>
    <Label Content="Note :" HorizontalAlignment="Left" Margin="6,240,0,0" VerticalAlignment="Top" Foreground="Black" Background="{x:Null}" FontFamily="Arial Unicode MS" Height="26" Width="42"/>
                <TextBox x:Name="txtCustomerNote" Controls:TextboxHelper.Watermark="Type Your Note Here" Controls:TextboxHelper.ClearTextButton="True" HorizontalAlignment="Left" Height="77" Margin="147,244,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="200" AcceptsReturn="True"/>
   </Grid>
  </GroupBox>

 </Grid>

And here is C# code:



1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using MahApps.Metro.Controls;
using MahApps.Metro.Controls.Dialogs;
using BLL;
using ENTITY;

namespace JSMS.UI
{
    /// <summary>
    /// Interaction logic for CustomerInfo.xaml
    /// </summary>
    public partial class CustomerInfoUI : MetroWindow
    {
        CustomerInfo _customerInfoObj = new CustomerInfo();
        CustomerInfoManager _customerInfManagerObj = new CustomerInfoManager();
        List<CustomerInfo> _customerInfoList = new List<CustomerInfo>();


        public CustomerInfoUI()
        {
            InitializeComponent();
            LoadAllCustomerInfo();
            btnSaveCustomer.IsEnabled = false;
            btnDeleteCustomer.IsEnabled = false;
        }

        //Close Button Event
        private void btnClose_Click(object sender, RoutedEventArgs e)
        {
            test testWindow = new test();
            testWindow.Show();
            this.Close();
        }

        //New Button Event
        private void btnNewCustomer_Click(object sender, RoutedEventArgs e)
        {
            txtCustomerName.Text = "";
            txtCustomerAddress.Text = "";
            txtCustomerPhone.Text = "";
            txtCustomerMobile.Text = "";
            txtCustomerFax.Text = "";
            txtCustomerEmail.Text = "";
            txtCustomerNote.Text = "";
        }

        //Save Customer
        private void btnSaveCustomer_Click(object sender, RoutedEventArgs e)
        {
            if (btnSaveCustomer.Content.ToString() == "Save Customer")
            {
                _customerInfoObj.CustomerName = txtCustomerName.Text;
                _customerInfoObj.CustomerAddress = txtCustomerAddress.Text;
                _customerInfoObj.CustomerPhone = txtCustomerPhone.Text;
                _customerInfoObj.CustomerMobile = txtCustomerMobile.Text;
                _customerInfoObj.CustomerFax = txtCustomerFax.Text;
                _customerInfoObj.CustomerEmail = txtCustomerEmail.Text;
                _customerInfoObj.CustomerNote = txtCustomerNote.Text;

                _customerInfManagerObj.SaveCustomerInfo(_customerInfoObj);

                txtCustomerName.Text = "";
                txtCustomerAddress.Text = "";
                txtCustomerPhone.Text = "";
                txtCustomerMobile.Text = "";
                txtCustomerFax.Text = "";
                txtCustomerEmail.Text = "";
                txtCustomerNote.Text = "";

                this.ShowMessageAsync("Confirmation", "Customer data is successfully saved");
                //MessageBox.Show("Customer data is successfully saved", "Confirmation");
                LoadAllCustomerInfo();
            }

            if (btnSaveCustomer.Content.ToString() == "Update Customer") // Update Customer
            {
                _customerInfoObj.CustomerName = txtCustomerName.Text;
                _customerInfoObj.CustomerAddress = txtCustomerAddress.Text;
                _customerInfoObj.CustomerPhone = txtCustomerPhone.Text;
                _customerInfoObj.CustomerMobile = txtCustomerMobile.Text;
                _customerInfoObj.CustomerFax = txtCustomerFax.Text;
                _customerInfoObj.CustomerEmail = txtCustomerEmail.Text;
                _customerInfoObj.CustomerNote = txtCustomerNote.Text;

                _customerInfManagerObj.UpdateCustomerInfo(_customerInfoObj);

                txtCustomerName.Text = "";
                txtCustomerAddress.Text = "";
                txtCustomerPhone.Text = "";
                txtCustomerMobile.Text = "";
                txtCustomerFax.Text = "";
                txtCustomerEmail.Text = "";
                txtCustomerNote.Text = "";

                this.ShowMessageAsync("Confirmation", "Customer data is successfully Update");
                //MessageBox.Show("Customer data is successfully Update", "Confirmation");
                btnSaveCustomer.Content = "Save Customer";
                btnSaveCustomer.IsEnabled = false;
                
            }
            
        }

        //Load data to ListView
        private void LoadAllCustomerInfo()
        {
            _customerInfoList = new List<CustomerInfo>();

            _customerInfoList = _customerInfManagerObj.LoadAllCustomerInfo();
            CustomerInfoListView.Items.Clear();

            if (_customerInfoList.Count > 0)
            {
                foreach (var item in _customerInfoList)
                {
                    CustomerInfoListView.Items.Add(item);
                }
            }
        }

        //Edit Context Menu code
        private void EditProgramContexMenu_Click(object sender, RoutedEventArgs e)
        {
            btnSaveCustomer.IsEnabled = true;

            _customerInfoObj = new CustomerInfo();
            _customerInfoObj = ((CustomerInfo)CustomerInfoListView.SelectedItem);
            txtCustomerName.Text = _customerInfoObj.CustomerName;
            txtCustomerAddress.Text = _customerInfoObj.CustomerAddress;
            txtCustomerPhone.Text = _customerInfoObj.CustomerPhone;
            txtCustomerMobile.Text = _customerInfoObj.CustomerMobile;
            txtCustomerFax.Text = _customerInfoObj.CustomerFax;
            txtCustomerEmail.Text = _customerInfoObj.CustomerEmail;
            txtCustomerNote.Text = _customerInfoObj.CustomerNote;
            btnSaveCustomer.Content = "Update Customer";
        }

        //Remove data from database
        private void RemoveProgramContexMenu_Click(object sender, RoutedEventArgs e)
        {
            _customerInfoObj = new CustomerInfo();
            _customerInfoObj = ((CustomerInfo)CustomerInfoListView.SelectedItem);
            _customerInfManagerObj.DeleteCustomerInfo(_customerInfoObj);
            LoadAllCustomerInfo();

        }

        //Remove data from database
        private void btnDeleteCustomer_Click(object sender, RoutedEventArgs e)
        {
            _customerInfoObj = new CustomerInfo();
            _customerInfoObj = ((CustomerInfo)CustomerInfoListView.SelectedItem);
            _customerInfManagerObj.DeleteCustomerInfo(_customerInfoObj);
            LoadAllCustomerInfo();
        }


        private void txtCustomerName_TextChanged(object sender, TextChangedEventArgs e)
        {
            btnSaveCustomer.IsEnabled = true;
        }

        //Send data to another form
        private void CustomerInfoListView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (CustomerInfoListView.SelectedIndex > -1)
            {
                this.DialogResult = true;
            }
        }
    }
}

WPF C# Data Save, Update and Delete with 3 layer architecture - Part 3(BLL Class)

In BLL class library, add two references of DAL & ENTITY, Now use this code.


1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using ENTITY;

namespace BLL
{
    public class CustomerInfoManager
    {
        CustomerInfoGetway customerInfoGetwayObj = new CustomerInfoGetway();
        public void SaveCustomerInfo(CustomerInfo _customerInfoObj)
        {
            customerInfoGetwayObj.SaveCustomerInfo(_customerInfoObj);
        }

        public List<CustomerInfo> LoadAllCustomerInfo()
        {
            return customerInfoGetwayObj.LoadAllCustomerInfo();
        }
        public void UpdateCustomerInfo(CustomerInfo _customerInfoObj)
        {
            customerInfoGetwayObj.UpdateCustomerInfo(_customerInfoObj);
        }

        public void DeleteCustomerInfo(CustomerInfo _customerInfoObj)
        {
            customerInfoGetwayObj.DeleteCustomerInfo(_customerInfoObj);
        }
    }
}

WPF C# Data Save, Update and Delete with 3 layer architecture - Part 2(DAL Class)

In DAL Class Library Project, add a class and name it CustomerInfoGetway.cs
First add two references of DAL & ENTITY. Now use this code.


1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DATA;
using ENTITY;

namespace DAL
{
    public class CustomerInfoGetway
    {
        //Create object of my EntityFramework data model
        JSMSEntities dataContextObj = new JSMSEntities();

        //Saving Customer Information 
        public void SaveCustomerInfo(CustomerInfo _customerInfoObj)
        {
            var newCustomerInfo = new tbl_Customer
            {
                CustomerName = _customerInfoObj.CustomerName,
                CustomerAddress = _customerInfoObj.CustomerAddress,
                CustomerPhone = _customerInfoObj.CustomerPhone,
                CustomerMobile = _customerInfoObj.CustomerMobile,
                CustomerFax = _customerInfoObj.CustomerFax,
                CustomerEmail = _customerInfoObj.CustomerEmail,
                CustomerNote = _customerInfoObj.CustomerNote,
            };

            dataContextObj.tbl_Customer.Add(newCustomerInfo);
            dataContextObj.SaveChanges();
        }

        //Call data from database to ListView 
        public List<CustomerInfo> LoadAllCustomerInfo()
        {
            dataContextObj = new JSMSEntities();
            List<CustomerInfo> customerInfoList = new List<CustomerInfo>();
            foreach (var c in (from p in dataContextObj.tbl_Customer select p).Distinct())
            {
                CustomerInfo _customerInfoObj = new CustomerInfo();
                _customerInfoObj.Id = c.ID;
                _customerInfoObj.CustomerName = c.CustomerName;
                _customerInfoObj.CustomerAddress = c.CustomerAddress;
                _customerInfoObj.CustomerPhone = c.CustomerPhone;
                _customerInfoObj.CustomerMobile = c.CustomerMobile;
                _customerInfoObj.CustomerFax = c.CustomerFax;
                _customerInfoObj.CustomerEmail = c.CustomerEmail;
                _customerInfoObj.CustomerNote = c.CustomerNote;

                customerInfoList.Add(_customerInfoObj);
            }
            return customerInfoList;
        }

        //Delete Customer Information
        public void DeleteCustomerInfo(CustomerInfo _customerInfoObj)
        {
            tbl_Customer customer = dataContextObj.tbl_Customer.First(c => c.ID == _customerInfoObj.Id);
            dataContextObj.tbl_Customer.Remove(customer);
            dataContextObj.SaveChanges();
        }

        //Update Customer Information
        public void UpdateCustomerInfo(CustomerInfo _customerInfoObj)
        {
            var customerinfo = dataContextObj.tbl_Customer.First(c => c.ID == _customerInfoObj.Id);
            customerinfo.CustomerName = _customerInfoObj.CustomerName;
            customerinfo.CustomerAddress = _customerInfoObj.CustomerAddress;
            customerinfo.CustomerPhone = _customerInfoObj.CustomerPhone;
            customerinfo.CustomerMobile = _customerInfoObj.CustomerMobile;
            customerinfo.CustomerFax = _customerInfoObj.CustomerFax;
            customerinfo.CustomerEmail = _customerInfoObj.CustomerEmail;
            customerinfo.CustomerNote = _customerInfoObj.CustomerNote;
            dataContextObj.SaveChanges();
        }

    }
}


WPF C# Data Save, Update and Delete with 3 layer architecture - Part 1(Entity Class)

In ENTITY class library project, add a class and name it CustomerInfo.cs or whatever you want.
Now Use this code to your Entity class.



1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ENTITY
{
    public class CustomerInfo
    {
        private int id;

        public int Id
        {
            get { return id; }
            set { id = value; }
        }

        private string customerName;

        public string CustomerName
        {
            get { return customerName; }
            set { customerName = value; }
        }

        private string customerAddress;

        public string CustomerAddress
        {
            get { return customerAddress; }
            set { customerAddress = value; }
        }

        private string customerPhone;

        public string CustomerPhone
        {
            get { return customerPhone; }
            set { customerPhone = value; }
        }

        private string customerMobile;

        public string CustomerMobile
        {
            get { return customerMobile; }
            set { customerMobile = value; }
        }

        private string customerFax;

        public string CustomerFax
        {
            get { return customerFax; }
            set { customerFax = value; }
        }

        private string customerEmail;

        public string CustomerEmail
        {
            get { return customerEmail; }
            set { customerEmail = value; }
        }

        private string customerNote;

        public string CustomerNote
        {
            get { return customerNote; }
            set { customerNote = value; }
        }

    }
}