コード例 #1
0
 private async void Button_Click_5(object sender, RoutedEventArgs e)
 {
     try
     {
         var addemployee = new deliverylinqDataContext();
         addemployee.addemployees(empname.Text, empnic.Text, empmob.Text, empaddress.Text, empbasicsalary.Text,
                                  empposition.Text);
         await
         this.ShowMessageAsync("Congratulations !",
                               "Successfull recruit new employee to the company, you can view current details from the panel.");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     finally
     {
         empname.Text        = "";
         empnic.Text         = "";
         empmob.Text         = "";
         empaddress.Text     = "";
         empbasicsalary.Text = "";
         empposition.Text    = "";
     }
 }
コード例 #2
0
 private async void Button_Click_4(object sender, RoutedEventArgs e)
 {
     try
     {
         var newdelivery = new deliverylinqDataContext();
         newdelivery.insertdelivery(delfrom.Text, deladd1.Text, deladd2.Text, deladd3.Text, delcity.Text,
                                    delmob.Text, delto.Text, toadd1.Text, toadd2.Text, toadd3.Text, tocity.Text, tomob.Text,
                                    deldescript.Text);
         await
         this.ShowMessageAsync("Successful",
                               "Successfull added new delivery to the system, you can view current details from stock manager window.");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     finally
     {
         delfrom.Text     = "";
         deladd1.Text     = "";
         deladd2.Text     = "";
         deladd3.Text     = "";
         delcity.Text     = "";
         delmob.Text      = "";
         delto.Text       = "";
         toadd1.Text      = "";
         toadd2.Text      = "";
         toadd3.Text      = "";
         tocity.Text      = "";
         tomob.Text       = "";
         deldescript.Text = "";
     }
 }
コード例 #3
0
        private void cleardelivery(object sender, RoutedEventArgs e)
        {
            var samployee = new deliverylinqDataContext();

            samployee.emap(deladd2.Text, deladd3.Text, deladd1.Text);
        }