示例#1
0
 public static PopupObject PopupRowToObject(DataRow popup)
 {
     PopupObject obj = new PopupObject();
     try
     {
         if (popup != null)
         {
             obj.PopupID = RowFunctions.GetValueFromRowToGuid(popup, PopupObject.POPUP_ID, true, DataRowVersion.Current);
             obj.Description = RowFunctions.GetValueFromRowToString(popup,PopupObject.DESCRIPTION,true,DataRowVersion.Current);
             obj.Repeation = (Framework.Common.Enumeration.Frequency.TimeFrequency)RowFunctions.GetValueFromRowToInteger(popup, PopupObject.REPEAT, true, DataRowVersion.Current);
             obj.Time = RowFunctions.GetValueFromRowToString(popup,PopupObject.TIME,true,DataRowVersion.Current);
             obj.Active = RowFunctions.GetValueFromRowToBoolean(popup,PopupObject.ACTIVE,true,DataRowVersion.Current);
             obj.CreationDate = RowFunctions.GetValueFromRowToString(popup,PopupObject.CREATIONDATE,true,DataRowVersion.Current);
             obj.ShowDirect = RowFunctions.GetValueFromRowToBoolean(popup, PopupObject.SHOW_DIRECT, true, DataRowVersion.Current);
             return obj;
         }
         obj = null;
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
     return obj;
 }
示例#2
0
        public static PopupObject PopupRowToObject(DataRow popup)
        {
            PopupObject obj = new PopupObject();

            try
            {
                if (popup != null)
                {
                    obj.PopupID      = RowFunctions.GetValueFromRowToGuid(popup, PopupObject.POPUP_ID, true, DataRowVersion.Current);
                    obj.Description  = RowFunctions.GetValueFromRowToString(popup, PopupObject.DESCRIPTION, true, DataRowVersion.Current);
                    obj.Repeation    = (Framework.Common.Enumeration.Frequency.TimeFrequency)RowFunctions.GetValueFromRowToInteger(popup, PopupObject.REPEAT, true, DataRowVersion.Current);
                    obj.Time         = RowFunctions.GetValueFromRowToString(popup, PopupObject.TIME, true, DataRowVersion.Current);
                    obj.Active       = RowFunctions.GetValueFromRowToBoolean(popup, PopupObject.ACTIVE, true, DataRowVersion.Current);
                    obj.CreationDate = RowFunctions.GetValueFromRowToString(popup, PopupObject.CREATIONDATE, true, DataRowVersion.Current);
                    obj.ShowDirect   = RowFunctions.GetValueFromRowToBoolean(popup, PopupObject.SHOW_DIRECT, true, DataRowVersion.Current);
                    return(obj);
                }
                obj = null;
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
            return(obj);
        }
 public int Add(PopupObject value)
 {
     try
     {
         return(List.Add(value));
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
 public void Remove(PopupObject value)
 {
     try
     {
         List.Remove(value);
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
 // Called by PopupObject when it changes
 internal void PopupObjectChanged(PopupObject Popup)
 {
     try
     {
         int index = List.IndexOf(Popup);
         OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, index));
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
 protected override void OnRemoveComplete(int index, object value)
 {
     try
     {
         PopupObject Popup = (PopupObject)value;
         Popup.Parent = this;
         OnListChanged(new ListChangedEventArgs(ListChangedType.ItemDeleted, index));
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
 // Methods.
 object IBindingList.AddNew()
 {
     try
     {
         PopupObject Popup = new PopupObject();
         List.Add(Popup);
         return(Popup);
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
示例#8
0
 public void Initialize()
 {
     try
     {
         _popup                = new PopupObject();
         _popup.ShowDirect     = true;
         dteStartDate.DateTime = System.DateTime.Now;
         cmbFrequency.Properties.Items.AddRange(Enum.GetValues(typeof(Enumeration.Frequency.TimeFrequency)));
         dteStartDate.DateTime = System.DateTime.Now;
         txtTimeOfDay.Text     = System.DateTime.Now.TimeOfDay.Hours + ":" + System.DateTime.Now.TimeOfDay.Minutes + ":" + System.DateTime.Now.TimeOfDay.Seconds;
     }
     catch (System.Exception exception1)
     {
         System.Exception innerException = exception1;
         throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
        protected override void OnSetComplete(int index, object oldValue, object newValue)
        {
            try
            {
                if (oldValue != newValue)
                {
                    PopupObject oldPopup = (PopupObject)oldValue;
                    PopupObject newPopup = (PopupObject)newValue;
                    oldPopup.Parent = null;
                    newPopup.Parent = this;

                    OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, index));
                }
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
        }
示例#10
0
        public Popup(PROF_IT.Common.Enumerations.TypeForm typeForm, PopupObject popup)
        {
            try
            {
                InitializeComponent();

                _popup = popup;
                _typeForm = typeForm;
                if (_typeForm == PROF_IT.Common.Enumerations.TypeForm.NewForm)
                {
                    throw new NotImplementedException();
                }
                else
                {
                    InitializePropertyForm();
                    SetPermissions();
                }
            }
            catch (System.Exception exception1)
            {
                System.Exception innerException = exception1;
                throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
        }
示例#11
0
        public Popup(PROF_IT.Common.Enumerations.TypeForm typeForm, PopupObject popup)
        {
            try
            {
                InitializeComponent();

                _popup    = popup;
                _typeForm = typeForm;
                if (_typeForm == PROF_IT.Common.Enumerations.TypeForm.NewForm)
                {
                    throw new NotImplementedException();
                }
                else
                {
                    InitializePropertyForm();
                    SetPermissions();
                }
            }
            catch (System.Exception exception1)
            {
                System.Exception innerException = exception1;
                throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
        }
示例#12
0
 public int Add(PopupObject value)
 {
     try
     {
         return List.Add(value);
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
示例#13
0
 public void Remove(PopupObject value)
 {
     try
     {
         List.Remove(value);
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
示例#14
0
 public void Initialize()
 {
     try
     {
         _popup = new PopupObject();
         _popup.ShowDirect = true;
         dteStartDate.DateTime = System.DateTime.Now;
         cmbFrequency.Properties.Items.AddRange(Enum.GetValues(typeof(Enumeration.Frequency.TimeFrequency)));
         dteStartDate.DateTime = System.DateTime.Now;
         txtTimeOfDay.Text = System.DateTime.Now.TimeOfDay.Hours + ":" + System.DateTime.Now.TimeOfDay.Minutes + ":" + System.DateTime.Now.TimeOfDay.Seconds;
     }
     catch (System.Exception exception1)
     {
         System.Exception innerException = exception1;
         throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
示例#15
0
 // Called by PopupObject when it changes
 internal void PopupObjectChanged(PopupObject Popup)
 {
     try
     {
         int index = List.IndexOf(Popup);
         OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, index));
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
示例#16
0
 public void RemoveAllByPopup(PopupObject popup)
 {
     try
     {
         foreach (PopupUserObject popupUser in popup.PopupUsers)
         {
             Remove(popupUser);
         }
     }
     catch (Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
示例#17
0
 // Methods.
 object IBindingList.AddNew()
 {
     try
     {
         PopupObject Popup = new PopupObject();
         List.Add(Popup);
         return Popup;
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }