Exemple #1
0
        internal static int UpdateClassification()
        {
            n = 0;
            try
            {
                daClassification = new TblClassificationTableAdapter();
                dtClassification = new DsLiveOutlook.TblClassificationDataTable();
                daClassification.FillByID(dtClassification, ClassificationInfo.ID, ClassificationInfo.AClass);

                drwClassification = dtClassification[0];

                drwClassification.BeginEdit();

                drwClassification.ID      = ClassificationInfo.NewID.Trim();
                drwClassification.Display = ClassificationInfo.Display.Trim();
                drwClassification.Value   = ClassificationInfo.Value;

                drwClassification.EndEdit();
                n = daClassification.Update(dtClassification);
                return(n);
            }
            catch (Exception ex)
            {
                Interactive.LInfoError(ex.Message, "Record was not saved !");
                return(n);
            }
        }
Exemple #2
0
 internal static DataTable GetAllClassificationsByID()
 {
     try
     {
         dt = new DataTable();
         daClassification = new TblClassificationTableAdapter();
         dtClassification = new DsLiveOutlook.TblClassificationDataTable();
         daClassification.FillByID(dtClassification, ClassificationInfo.ID, ClassificationInfo.AClass);
         dt = dtClassification;
     }
     catch (Exception ex)
     {
         Interactive.LInfoError("Could not load Classification Information\n" + ex.Message, "Database connection failure");
     }
     return(dt);
 }