예제 #1
0
        public static MemoObject MemoRowToObject(DataRow Memo)
        {
            MemoObject obj = new MemoObject();

            try
            {
                if (Memo != null)
                {
                    if (RowFunctions.GetValueFromRowToGuid(Memo, MemoObject.MEMO_ID, false, DataRowVersion.Current) != Guid.Empty)
                    {
                        obj.MemoID = RowFunctions.GetValueFromRowToGuid(Memo, MemoObject.MEMO_ID, true, DataRowVersion.Current);
                        //obj.Material = MaterialConvertor.MaterialRowToObject(Memo);
                        obj.DateTime = PROF_IT.Common.Convert.DateFunctions.DBDateToDate(RowFunctions.GetValueFromRowToString(Memo, MemoObject.DATETIME, false, DataRowVersion.Current));
                        obj.Memo     = RowFunctions.GetValueFromRowToString(Memo, MemoObject.MEMO, false, 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 MemoObject MemoRowToObject(DataRow Memo)
 {
     MemoObject obj = new MemoObject();
     try
     {
         if (Memo != null)
         {
             if (RowFunctions.GetValueFromRowToGuid(Memo, MemoObject.MEMO_ID, false, DataRowVersion.Current) != Guid.Empty)
             {
                 obj.MemoID = RowFunctions.GetValueFromRowToGuid(Memo, MemoObject.MEMO_ID, true, DataRowVersion.Current);
                 //obj.Material = MaterialConvertor.MaterialRowToObject(Memo);
                 obj.DateTime = PROF_IT.Common.Convert.DateFunctions.DBDateToDate(RowFunctions.GetValueFromRowToString(Memo, MemoObject.DATETIME, false, DataRowVersion.Current));
                 obj.Memo = RowFunctions.GetValueFromRowToString(Memo, MemoObject.MEMO, false, DataRowVersion.Current);
             }
             return obj;
         }
         obj = null;
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
     return obj;
 }
예제 #3
0
 public int Add(MemoObject value)
 {
     try
     {
         return(List.Add(value));
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
예제 #4
0
 public void Remove(MemoObject value)
 {
     try
     {
         List.Remove(value);
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
예제 #5
0
 // Called by MemoObject when it changes
 internal void MemoObjectChanged(MemoObject Memo)
 {
     try
     {
         int index = List.IndexOf(Memo);
         OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, index));
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
예제 #6
0
 protected override void OnRemoveComplete(int index, object value)
 {
     try
     {
         MemoObject Memo = (MemoObject)value;
         Memo.Parent = this;
         OnListChanged(new ListChangedEventArgs(ListChangedType.ItemDeleted, index));
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
예제 #7
0
 // Methods.
 object IBindingList.AddNew()
 {
     try
     {
         MemoObject Memo = new MemoObject();
         List.Add(Memo);
         return(Memo);
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
예제 #8
0
        protected override void OnSetComplete(int index, object oldValue, object newValue)
        {
            try
            {
                if (oldValue != newValue)
                {
                    MemoObject oldMemo = (MemoObject)oldValue;
                    MemoObject newMemo = (MemoObject)newValue;
                    oldMemo.Parent = null;
                    newMemo.Parent = this;

                    OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, index));
                }
            }
            catch (System.Exception exception1)
            {
                Exception innerException = exception1;
                throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
        }
예제 #9
0
파일: Memo.cs 프로젝트: GianiWVL/VUYLSTEKE
 public Memo(PROF_IT.Common.Enumerations.TypeForm typeForm, MemoObject memo)
 {
     try
     {
         InitializeComponent();
         _memo     = memo;
         _typeForm = typeForm;
         if (_typeForm == PROF_IT.Common.Enumerations.TypeForm.NewForm)
         {
             throw new NotImplementedException();
         }
         else
         {
             InitializePropertyForm();
         }
     }
     catch (System.Exception exception1)
     {
         System.Exception innerException = exception1;
         throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
예제 #10
0
파일: Memo.cs 프로젝트: GianiWVL/VUYLSTEKE
 public Memo(PROF_IT.Common.Enumerations.TypeForm typeForm, MemoObject memo)
 {
     try
     {
         InitializeComponent();
         _memo = memo;
         _typeForm = typeForm;
         if (_typeForm == PROF_IT.Common.Enumerations.TypeForm.NewForm)
         {
             throw new NotImplementedException();
         }
         else
         {
             InitializePropertyForm();
         }
     }
     catch (System.Exception exception1)
     {
         System.Exception innerException = exception1;
         throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
예제 #11
0
 // Called by MemoObject when it changes
 internal void MemoObjectChanged(MemoObject Memo)
 {
     try
     {
         int index = List.IndexOf(Memo);
         OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, index));
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
예제 #12
0
 public void Remove(MemoObject value)
 {
     try
     {
         List.Remove(value);
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
예제 #13
0
 // Methods.
 object IBindingList.AddNew()
 {
     try
     {
         MemoObject Memo = new MemoObject();
         List.Add(Memo);
         return Memo;
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
예제 #14
0
 public int Add(MemoObject value)
 {
     try
     {
         return List.Add(value);
     }
     catch (System.Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
 }
예제 #15
0
 public bool Remove(MemoObject memo)
 {
     SqlCommand cmd = null;
     try
     {
         ExecuteNonQuery(out cmd, false, "Memo_DELETE",
             CreateParameter("@memoID", SqlDbType.UniqueIdentifier, memo.Memo, ParameterDirection.Input)
             );
         return true;
     }
     catch (Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
     finally
     {
         if (cmd != null)
         {
             cmd.Dispose();
         }
         cmd = null;
     }
 }
예제 #16
0
 public void Save(MemoObject memo)
 {
     SqlCommand cmd = null;
     try
     {
         ExecuteNonQuery(out cmd, false, "Memo_SAVE",
             CreateParameter("@memoID", SqlDbType.UniqueIdentifier, memo.MemoID, ParameterDirection.InputOutput),
             CreateParameter("@matID", SqlDbType.UniqueIdentifier, memo.Material == null ? Guid.Empty : memo.Material.MatID),
             CreateParameter("@datetime", SqlDbType.VarChar, PROF_IT.Common.Convert.DateFunctions.DateToLongStrDate(memo.DateTime)),
             CreateParameter("@memo", SqlDbType.VarChar, memo.Memo)
             );
         memo.MemoID = (Guid)cmd.Parameters["@memoID"].Value;
     }
     catch (Exception exception1)
     {
         Exception innerException = exception1;
         throw new Exception(MethodBase.GetCurrentMethod().Name, innerException);
     }
     finally
     {
         if (cmd != null)
         {
             cmd.Dispose();
         }
         cmd = null;
     }
 }
예제 #17
0
파일: Memo.cs 프로젝트: GianiWVL/VUYLSTEKE
        public void Initialize()
        {
            try
            {
                MemoMember = new MemoObject();

            }
            catch (System.Exception exception1)
            {
                System.Exception innerException = exception1;
                throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException);
            }
        }