Exemple #1
0
        private void ChangeCustomer()
        {
            var viewModel = new ChangeCustomerViewModel();

            if (_dialogService.ShowDialog(viewModel) == true)
            {
                _customer = viewModel.SelectedCustomer;
                Notify(() => CustomerName);
            }
        }
 public static void SaveDelivery(Cstm customer, string addressLine, string cityState, string zipCode)
 {
     using (var connection = new SqlConnection(_connectionString))
     {
         string query = @"
             INSERT [dbo].[DLVR_TBL] (CSTM, STS)
             VALUES (@CSTM, 'N')
             DECLARE @ID int
             SELECT @ID = SCOPE_IDENTITY()
             INSERT [dbo].[ADDR_TBL] (STR, CT_ST, ZP, DLVR)
             VALUES (@STR, @CT_ST, @ZP, @ID)";
         connection.Execute(query, new { CSTM = customer.NMB_CLM, STR = addressLine, CT_ST = cityState, ZP = zipCode });
     }
 }