Beispiel #1
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (btnSave.Text == "Add")
     {
         var productType = new ProductType
         {
             ID        = Guid.NewGuid(),
             Key       = txtType.Text,
             Value     = txtValue.Text,
             EntryDate = DateTime.Now,
             Status    = "Active"
         };
         productTypeController.Add(productType);
         MessageBox.Show("ProductType Added Sucessfully");
         grdProducts.DataSource = productTypeController.GetAllDataTable();
     }
     else
     {
     }
 }
        public static String[] Insert(String name, String desc)
        {
            String[] message = typeController.Add(name, desc);

            return(message);
        }