Ejemplo n.º 1
0
        public static LanguageObject LanguageRowToObject(DataRow Language, string alias)
        {
            LanguageObject obj = new LanguageObject();

            try
            {
                if (Language != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(Language, LanguageObject.ConvertColumnToAlias(LanguageObject.LAN_ID, alias), false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.LanID         = RowFunctions.GetValueFromRowToGuid(Language, LanguageObject.ConvertColumnToAlias(LanguageObject.LAN_ID, alias), true, DataRowVersion.Current);
                        obj.Language      = RowFunctions.GetValueFromRowToString(Language, LanguageObject.ConvertColumnToAlias(LanguageObject.LANGUAGE, alias), false, DataRowVersion.Current);
                        obj.LanguageDutch = RowFunctions.GetValueFromRowToString(Language, LanguageObject.ConvertColumnToAlias(LanguageObject.LANGUAGE_DUTCH, alias), false, DataRowVersion.Current);
                    }
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
Ejemplo n.º 2
0
 public void Remove(LanguageObject value)
 {
     try
     {
         List.Remove(value);
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
Ejemplo n.º 3
0
 public int Add(LanguageObject value)
 {
     try
     {
         return(List.Add(value));
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
Ejemplo n.º 4
0
 // Called by LanguageObject when it changes
 internal void LanguageObjectChanged(LanguageObject Language)
 {
     try
     {
         int index = List.IndexOf(Language);
         OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, index));
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
Ejemplo n.º 5
0
 // Methods.
 object IBindingList.AddNew()
 {
     try
     {
         LanguageObject Language = new LanguageObject();
         List.Add(Language);
         return(Language);
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
Ejemplo n.º 6
0
 protected override void OnRemoveComplete(int index, object value)
 {
     try
     {
         LanguageObject Language = (LanguageObject)value;
         Language.Parent = this;
         OnListChanged(new ListChangedEventArgs(ListChangedType.ItemDeleted, index));
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
Ejemplo n.º 7
0
        protected override void OnSetComplete(int index, object oldValue, object newValue)
        {
            try
            {
                if (oldValue != newValue)
                {
                    LanguageObject oldLanguage = (LanguageObject)oldValue;
                    LanguageObject newLanguage = (LanguageObject)newValue;
                    oldLanguage.Parent = null;
                    newLanguage.Parent = this;

                    OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, index));
                }
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
        }