예제 #1
0
        private void btn_UpdateExpenceSubHead(object sender, RoutedEventArgs e)
        {
            if (dg_AllExpenceSubHeads.SelectedItem != null)
            {
                SubHeadHeadNameModel mm  = (SubHeadHeadNameModel)dg_AllExpenceSubHeads.SelectedItem;
                tbl_ExpenceSubHead   esh = ExpenceSubHead.getById(mm.Id);
                var dialog = new Form_InputDialog(mm.Name);

                if (dialog.ShowDialog() == true)
                {
                    esh.Name = dialog.ResponseText;
                    ExpenceSubHead.update(esh);
                    AutoClosingMessageBox.Show("Expence Sub-Head Updated", "Success", 3000);
                    initFormOperations();
                }
            }
        }
예제 #2
0
 private void btn_UpdateFoodItemCategory(object sender, RoutedEventArgs e)
 {
     if (dg_AllFoodItemCategory.SelectedItem != null)
     {
         tbl_FoodItemCategory category = (tbl_FoodItemCategory)dg_AllFoodItemCategory.SelectedItem;
         var dialog = new Form_InputDialog(category.Name);
         if (dialog.ShowDialog() == true)
         {
             category.Name = dialog.ResponseText;
             FoodItemCategory.update(category);
             AutoClosingMessageBox.Show("Category Updated", "Success", 3000);
             initFormOperations();
         }
     }
     else
     {
         AutoClosingMessageBox.Show("Please Select a Item", "Alert", 3000);
     }
 }
예제 #3
0
 private void btn_UpdateExpenceHead(object sender, RoutedEventArgs e)
 {
     if (dg_AllExpenceHeads.SelectedItem != null)
     {
         tbl_ExpenceHead eh     = (tbl_ExpenceHead)dg_AllExpenceHeads.SelectedItem;
         var             dialog = new Form_InputDialog(eh.Name);
         if (dialog.ShowDialog() == true)
         {
             eh.Name = dialog.ResponseText;
             ExpenceHead.update(eh);
             AutoClosingMessageBox.Show("Expence Head Updated", "Success", 3000);
             initFormOperations();
         }
     }
     else
     {
         AutoClosingMessageBox.Show("Select A Item", "Alert", 3000);
     }
 }