Example #1
0
        //***************** REF_SYS_LOG *********************************************
        public static int InsertT_OE_SYS_LOG(string logType, string logMsg)
        {
            using (OpenEnvironmentEntities ctx = new OpenEnvironmentEntities())
            {
                try
                {
                    T_OE_SYS_LOG e = new T_OE_SYS_LOG();
                    e.LOG_TYPE = logType;
                    if (logMsg != null)
                        e.LOG_MSG = logMsg.SubStringPlus(0, 1999);
                    e.LOG_DT = System.DateTime.Now;

                    ctx.AddToT_OE_SYS_LOG(e);
                    ctx.SaveChanges();
                    return e.SYS_LOG_ID;
                }
                catch
                {
                    return 0;
                }
            }
        }