Пример #1
0
 /// <summary>
 /// 新增/删除/修改 sys_Event
 /// </summary>
 /// <param name="fam">sys_EventTable实体类</param>
 /// <returns>返回0操正常</returns>
 public abstract int sys_EventInsertUpdate(sys_EventTable fam);
Пример #2
0
        /// <summary>
        /// 将记录集转为sys_EventTable实体类
        /// </summary>
        /// <param name="dr">记录集</param>
        /// <returns>sys_EventTable</returns>
        protected object Populatesys_Event(IDataReader dr)
        {
            sys_EventTable nc = new sys_EventTable();

            if (!Convert.IsDBNull(dr["EventID"])) nc.EventID = Convert.ToInt32(dr["EventID"]); // 事件ID号
            if (!Convert.IsDBNull(dr["E_U_LoginName"])) nc.E_U_LoginName = Convert.ToString(dr["E_U_LoginName"]).Trim(); // 用户名
            if (!Convert.IsDBNull(dr["E_UserID"])) nc.E_UserID = Convert.ToInt32(dr["E_UserID"]); // 操作时用户ID与sys_Users中UserID
            if (!Convert.IsDBNull(dr["E_DateTime"])) nc.E_DateTime = Convert.ToDateTime(dr["E_DateTime"]); // 事件发生的日期及时间
            if (!Convert.IsDBNull(dr["E_ApplicationID"])) nc.E_ApplicationID = Convert.ToInt32(dr["E_ApplicationID"]); // 所属应用程序ID与sys_Applicatio
            if (!Convert.IsDBNull(dr["E_A_AppName"])) nc.E_A_AppName = Convert.ToString(dr["E_A_AppName"]).Trim(); // 所属应用名称
            if (!Convert.IsDBNull(dr["E_M_Name"])) nc.E_M_Name = Convert.ToString(dr["E_M_Name"]).Trim(); // PageCode模块名称与sys_Module相同
            if (!Convert.IsDBNull(dr["E_M_PageCode"])) nc.E_M_PageCode = Convert.ToString(dr["E_M_PageCode"]).Trim(); // 发生事件时模块名称
            if (!Convert.IsDBNull(dr["E_From"])) nc.E_From = Convert.ToString(dr["E_From"]).Trim(); // 来源
            if (!Convert.IsDBNull(dr["E_Type"])) nc.E_Type = Convert.ToInt32(dr["E_Type"]); // 日记类型,1:操作日记2:安全日志3
            if (!Convert.IsDBNull(dr["E_IP"])) nc.E_IP = Convert.ToString(dr["E_IP"]).Trim(); // 客户端IP地址
            if (!Convert.IsDBNull(dr["E_Record"])) nc.E_Record = Convert.ToString(dr["E_Record"]).Trim(); // 详细描述
            return nc;
        }
        /// <summary>
        /// 新增/删除/修改 sys_Event
        /// </summary>
        /// <param name="fam">sys_EventTable实体类</param>
        /// <returns>返回0操正常</returns>
        public override int sys_EventInsertUpdate(sys_EventTable fam)
        {
            int rInt = 0;

            using (OleDbConnection Conn = GetSqlConnection())
            {
                string CommTxt;
                OleDbCommand cmd = new OleDbCommand();
                cmd.Connection = Conn;
                if (fam.DB_Option_Action_ == "Insert")
                {
                    CommTxt = "Insert into 	sys_Event(E_U_LoginName,E_UserID,E_DateTime,E_ApplicationID,E_A_AppName,E_M_Name,E_M_PageCode,E_From,E_Type,E_IP,E_Record)VALUES(@E_U_LoginName,@E_UserID,@E_DateTime,@E_ApplicationID,@E_A_AppName,@E_M_Name,@E_M_PageCode,@E_From,@E_Type,@E_IP,@E_Record)";
                    cmd.CommandText = CommTxt;

                    cmd.Parameters.Add("@E_U_LoginName", OleDbType.VarWChar).Value = fam.E_U_LoginName + ""; //用户名	
                    cmd.Parameters.Add("@E_UserID", OleDbType.Integer).Value = fam.E_UserID; //操作时用户ID与sys_Users中UserID	
                    cmd.Parameters.Add("@E_DateTime", OleDbType.Date).Value = fam.E_DateTime; //事件发生的日期及时间	
                    cmd.Parameters.Add("@E_ApplicationID", OleDbType.Integer).Value = fam.E_ApplicationID; //所属应用程序ID与sys_Applicatio
                    cmd.Parameters.Add("@E_A_AppName", OleDbType.VarWChar).Value = fam.E_A_AppName + ""; //所属应用名称
                    cmd.Parameters.Add("@E_M_Name", OleDbType.VarWChar).Value = fam.E_M_Name + ""; //PageCode模块名称与sys_Module相同	
                    cmd.Parameters.Add("@E_M_PageCode", OleDbType.VarWChar).Value = fam.E_M_PageCode + ""; //发生事件时模块名称
                    cmd.Parameters.Add("@E_From", OleDbType.VarWChar).Value = fam.E_From + ""; //来源
                    cmd.Parameters.Add("@E_Type", OleDbType.LongVarWChar).Value = fam.E_Type + "";  //日记类型,1:操作日记2:安全日志3	
                    cmd.Parameters.Add("@E_IP", OleDbType.VarWChar).Value = fam.E_IP + ""; //客户端IP地址
                    cmd.Parameters.Add("@E_Record", OleDbType.VarWChar).Value = fam.E_Record + ""; //详细描述
                }
                else if (fam.DB_Option_Action_ == "Update")
                {

                    CommTxt = "UPDATE sys_Event SET	E_U_LoginName = @E_U_LoginName,E_UserID = @E_UserID,E_DateTime = @E_DateTime,E_ApplicationID = @E_ApplicationID,E_A_AppName = @E_A_AppName,E_M_Name = @E_M_Name,E_M_PageCode = @E_M_PageCode,E_From = @E_From,E_Type = @E_Type,E_IP = @E_IP,E_Record = @E_Record WHERE (EventID = @EventID)";
                    cmd.CommandText = CommTxt;

                    cmd.Parameters.Add("@E_U_LoginName", OleDbType.VarWChar).Value = fam.E_U_LoginName + ""; //用户名	
                    cmd.Parameters.Add("@E_UserID", OleDbType.Integer).Value = fam.E_UserID; //操作时用户ID与sys_Users中UserID	
                    cmd.Parameters.Add("@E_DateTime", OleDbType.Date).Value = fam.E_DateTime; //事件发生的日期及时间	
                    cmd.Parameters.Add("@E_ApplicationID", OleDbType.Integer).Value = fam.E_ApplicationID; //所属应用程序ID与sys_Applicatio
                    cmd.Parameters.Add("@E_A_AppName", OleDbType.VarWChar).Value = fam.E_A_AppName + ""; //所属应用名称
                    cmd.Parameters.Add("@E_M_Name", OleDbType.VarWChar).Value = fam.E_M_Name + ""; //PageCode模块名称与sys_Module相同	
                    cmd.Parameters.Add("@E_M_PageCode", OleDbType.VarWChar).Value = fam.E_M_PageCode + ""; //发生事件时模块名称
                    cmd.Parameters.Add("@E_From", OleDbType.VarWChar).Value = fam.E_From + ""; //来源
                    cmd.Parameters.Add("@E_Type", OleDbType.LongVarWChar).Value = fam.E_Type + "";  //日记类型,1:操作日记2:安全日志3	
                    cmd.Parameters.Add("@E_IP", OleDbType.VarWChar).Value = fam.E_IP + ""; //客户端IP地址
                    cmd.Parameters.Add("@E_Record", OleDbType.VarWChar).Value = fam.E_Record + ""; //详细描述
                    cmd.Parameters.Add("@EventID", OleDbType.Integer).Value = fam.EventID;
                }
                else if (fam.DB_Option_Action_ == "Delete")
                {
                    CommTxt = "Delete from  sys_Event  WHERE (EventID = @EventID)";
                    cmd.CommandText = CommTxt;
                    cmd.Parameters.Add("@EventID", OleDbType.Integer).Value = fam.EventID;
                }
                else
                    throw new ApplicationException("无法识别的操作命令!");
                Conn.Open();
                rInt = cmd.ExecuteNonQuery();
                if (fam.DB_Option_Action_ == "Insert")
                {
                    cmd.CommandText = "SELECT @@identity";
                    rInt = Convert.ToInt32(cmd.ExecuteScalar());
                }
                cmd.Dispose();
                Conn.Dispose();
                Conn.Close();
            }
            return rInt;
        }
Пример #4
0
        /// <summary>
        /// ����/ɾ��/�޸� sys_Event
        /// </summary>
        /// <param name="fam">sys_EventTableʵ����</param>
        /// <returns>����0������</returns>
        public override int sys_EventInsertUpdate(sys_EventTable fam)
        {
            int rInt = 0;

            using (OracleConnection Conn = GetSqlConnection())
            {
                string CommTxt;
                OracleCommand cmd = new OracleCommand();
                cmd.Connection = Conn;
                if (fam.DB_Option_Action_ == "Insert")
                {
                    CommTxt = "Insert into 	sys_Event(EventID,E_U_LoginName,E_UserID,E_DateTime,E_ApplicationID,E_A_AppName,E_M_Name,E_M_PageCode,E_From,E_Type,E_IP,E_Record)VALUES(SEQ_sys_Event_ID.NEXTVAL,:E_U_LoginName,:E_UserID,:E_DateTime,:E_ApplicationID,:E_A_AppName,:E_M_Name,:E_M_PageCode,:E_From,:E_Type,:E_IP,:E_Record)";
                    cmd.CommandText = CommTxt;

                    cmd.Parameters.Add("E_U_LoginName", OracleType.NVarChar).Value = fam.E_U_LoginName + ""; //�û���
                    cmd.Parameters.Add("E_UserID", OracleType.Int32).Value = fam.E_UserID; //����ʱ�û�ID��sys_Users��UserID
                    cmd.Parameters.Add("E_DateTime", OracleType.DateTime).Value = fam.E_DateTime; //�¼����������ڼ�ʱ��
                    cmd.Parameters.Add("E_ApplicationID", OracleType.Int32).Value = fam.E_ApplicationID; //����Ӧ�ó���ID��sys_Applicatio
                    cmd.Parameters.Add("E_A_AppName", OracleType.NVarChar).Value = fam.E_A_AppName + ""; //����Ӧ������
                    cmd.Parameters.Add("E_M_Name", OracleType.NVarChar).Value = fam.E_M_Name + ""; //PageCodeģ��������sys_Module��ͬ
                    cmd.Parameters.Add("E_M_PageCode", OracleType.VarChar).Value = fam.E_M_PageCode + ""; //�����¼�ʱģ������
                    cmd.Parameters.Add("E_From", OracleType.NVarChar).Value = fam.E_From + ""; //��Դ
                    cmd.Parameters.Add("E_Type", OracleType.SByte).Value = fam.E_Type; //�ռ�����,1:�����ռ�2:��ȫ��־3
                    cmd.Parameters.Add("E_IP", OracleType.VarChar).Value = fam.E_IP + ""; //�ͻ���IP��ַ
                    cmd.Parameters.Add("E_Record", OracleType.NVarChar).Value = fam.E_Record + ""; //��ϸ����
                }
                else if (fam.DB_Option_Action_ == "Update")
                {

                    CommTxt = "UPDATE sys_Event SET	E_U_LoginName = :E_U_LoginName,E_UserID = :E_UserID,E_DateTime = :E_DateTime,E_ApplicationID = :E_ApplicationID,E_A_AppName = :E_A_AppName,E_M_Name = :E_M_Name,E_M_PageCode = :E_M_PageCode,E_From = :E_From,E_Type = :E_Type,E_IP = :E_IP,E_Record = :E_Record WHERE (EventID = :EventID)";
                    cmd.CommandText = CommTxt;

                    cmd.Parameters.Add("E_U_LoginName", OracleType.NVarChar).Value = fam.E_U_LoginName + ""; //�û���
                    cmd.Parameters.Add("E_UserID", OracleType.Int32).Value = fam.E_UserID; //����ʱ�û�ID��sys_Users��UserID
                    cmd.Parameters.Add("E_DateTime", OracleType.DateTime).Value = fam.E_DateTime; //�¼����������ڼ�ʱ��
                    cmd.Parameters.Add("E_ApplicationID", OracleType.Int32).Value = fam.E_ApplicationID; //����Ӧ�ó���ID��sys_Applicatio
                    cmd.Parameters.Add("E_A_AppName", OracleType.NVarChar).Value = fam.E_A_AppName + ""; //����Ӧ������
                    cmd.Parameters.Add("E_M_Name", OracleType.NVarChar).Value = fam.E_M_Name + ""; //PageCodeģ��������sys_Module��ͬ
                    cmd.Parameters.Add("E_M_PageCode", OracleType.VarChar).Value = fam.E_M_PageCode + ""; //�����¼�ʱģ������
                    cmd.Parameters.Add("E_From", OracleType.NVarChar).Value = fam.E_From + ""; //��Դ
                    cmd.Parameters.Add("E_Type", OracleType.SByte).Value = fam.E_Type; //�ռ�����,1:�����ռ�2:��ȫ��־3
                    cmd.Parameters.Add("E_IP", OracleType.VarChar).Value = fam.E_IP + ""; //�ͻ���IP��ַ
                    cmd.Parameters.Add("E_Record", OracleType.NVarChar).Value = fam.E_Record + ""; //��ϸ����
                    cmd.Parameters.Add("EventID", OracleType.Int32).Value = fam.EventID;
                }
                else if (fam.DB_Option_Action_ == "Delete")
                {
                    CommTxt = "Delete from  sys_Event  WHERE (EventID = :EventID)";
                    cmd.CommandText = CommTxt;
                    cmd.Parameters.Add("EventID", OracleType.Int32).Value = fam.EventID;
                }
                else
                    throw new ApplicationException("�޷�ʶ��IJ�������!");
                Conn.Open();
                OracleTransaction Tran = Conn.BeginTransaction();
                cmd.Transaction = Tran;
                try
                {
                    rInt = cmd.ExecuteNonQuery();
                    cmd.Parameters.Clear();
                    if (fam.DB_Option_Action_ == "Insert")
                    {
                        cmd.CommandText = "select SEQ_sys_Event_ID.CURRVAL from  dual";
                        rInt = Convert.ToInt32(cmd.ExecuteScalar());
                    }
                    Tran.Commit();
                }
                catch (Exception ex)
                {
                    Tran.Rollback();
                    throw new ApplicationException(ex.ToString());
                }
                finally
                {
                    Tran.Dispose();
                    cmd.Dispose();
                    Conn.Dispose();
                    Conn.Close();
                }
            }
            return rInt;
        }
        /// <summary>
        /// 新增/删除/修改 sys_Event
        /// </summary>
        /// <param name="fam">sys_EventTable实体类</param>
        /// <returns>返回0操正常</returns>
        public override int sys_EventInsertUpdate(sys_EventTable fam)
        {
            int rInt = 0;

            using (OracleConnection Conn = GetSqlConnection())
            {
                string CommTxt;
                OracleCommand cmd = new OracleCommand();
                cmd.Connection = Conn;
                if (fam.DB_Option_Action_ == "Insert")
                {
                    CommTxt = "Insert into 	sys_Event(EventID,E_U_LoginName,E_UserID,E_DateTime,E_ApplicationID,E_A_AppName,E_M_Name,E_M_PageCode,E_From,E_Type,E_IP,E_Record)VALUES(SEQ_sys_Event_ID.NEXTVAL,:E_U_LoginName,:E_UserID,:E_DateTime,:E_ApplicationID,:E_A_AppName,:E_M_Name,:E_M_PageCode,:E_From,:E_Type,:E_IP,:E_Record)";
                    cmd.CommandText = CommTxt;

                    cmd.Parameters.Add("E_U_LoginName", OracleType.NVarChar).Value = fam.E_U_LoginName + ""; //用户名	
                    cmd.Parameters.Add("E_UserID", OracleType.Int32).Value = fam.E_UserID; //操作时用户ID与sys_Users中UserID	
                    cmd.Parameters.Add("E_DateTime", OracleType.DateTime).Value = fam.E_DateTime; //事件发生的日期及时间	
                    cmd.Parameters.Add("E_ApplicationID", OracleType.Int32).Value = fam.E_ApplicationID; //所属应用程序ID与sys_Applicatio
                    cmd.Parameters.Add("E_A_AppName", OracleType.NVarChar).Value = fam.E_A_AppName + ""; //所属应用名称
                    cmd.Parameters.Add("E_M_Name", OracleType.NVarChar).Value = fam.E_M_Name + ""; //PageCode模块名称与sys_Module相同	
                    cmd.Parameters.Add("E_M_PageCode", OracleType.VarChar).Value = fam.E_M_PageCode + ""; //发生事件时模块名称
                    cmd.Parameters.Add("E_From", OracleType.NVarChar).Value = fam.E_From + ""; //来源
                    cmd.Parameters.Add("E_Type", OracleType.SByte).Value = fam.E_Type; //日记类型,1:操作日记2:安全日志3	
                    cmd.Parameters.Add("E_IP", OracleType.VarChar).Value = fam.E_IP + ""; //客户端IP地址
                    cmd.Parameters.Add("E_Record", OracleType.NVarChar).Value = fam.E_Record + ""; //详细描述
                }
                else if (fam.DB_Option_Action_ == "Update")
                {

                    CommTxt = "UPDATE sys_Event SET	E_U_LoginName = :E_U_LoginName,E_UserID = :E_UserID,E_DateTime = :E_DateTime,E_ApplicationID = :E_ApplicationID,E_A_AppName = :E_A_AppName,E_M_Name = :E_M_Name,E_M_PageCode = :E_M_PageCode,E_From = :E_From,E_Type = :E_Type,E_IP = :E_IP,E_Record = :E_Record WHERE (EventID = :EventID)";
                    cmd.CommandText = CommTxt;

                    cmd.Parameters.Add("E_U_LoginName", OracleType.NVarChar).Value = fam.E_U_LoginName + ""; //用户名	
                    cmd.Parameters.Add("E_UserID", OracleType.Int32).Value = fam.E_UserID; //操作时用户ID与sys_Users中UserID	
                    cmd.Parameters.Add("E_DateTime", OracleType.DateTime).Value = fam.E_DateTime; //事件发生的日期及时间	
                    cmd.Parameters.Add("E_ApplicationID", OracleType.Int32).Value = fam.E_ApplicationID; //所属应用程序ID与sys_Applicatio
                    cmd.Parameters.Add("E_A_AppName", OracleType.NVarChar).Value = fam.E_A_AppName + ""; //所属应用名称
                    cmd.Parameters.Add("E_M_Name", OracleType.NVarChar).Value = fam.E_M_Name + ""; //PageCode模块名称与sys_Module相同	
                    cmd.Parameters.Add("E_M_PageCode", OracleType.VarChar).Value = fam.E_M_PageCode + ""; //发生事件时模块名称
                    cmd.Parameters.Add("E_From", OracleType.NVarChar).Value = fam.E_From + ""; //来源
                    cmd.Parameters.Add("E_Type", OracleType.SByte).Value = fam.E_Type; //日记类型,1:操作日记2:安全日志3	
                    cmd.Parameters.Add("E_IP", OracleType.VarChar).Value = fam.E_IP + ""; //客户端IP地址
                    cmd.Parameters.Add("E_Record", OracleType.NVarChar).Value = fam.E_Record + ""; //详细描述
                    cmd.Parameters.Add("EventID", OracleType.Int32).Value = fam.EventID;
                }
                else if (fam.DB_Option_Action_ == "Delete")
                {
                    CommTxt = "Delete from  sys_Event  WHERE (EventID = :EventID)";
                    cmd.CommandText = CommTxt;
                    cmd.Parameters.Add("EventID", OracleType.Int32).Value = fam.EventID;
                }
                else
                    throw new ApplicationException("无法识别的操作命令!");
                Conn.Open();
                OracleTransaction Tran = Conn.BeginTransaction();
                cmd.Transaction = Tran;
                try
                {
                    rInt = cmd.ExecuteNonQuery();
                    cmd.Parameters.Clear();
                    if (fam.DB_Option_Action_ == "Insert")
                    {
                        cmd.CommandText = "select SEQ_sys_Event_ID.CURRVAL from  dual";
                        rInt = Convert.ToInt32(cmd.ExecuteScalar());
                    }
                    Tran.Commit();
                }
                catch (Exception ex)
                {
                    Tran.Rollback();
                    throw new ApplicationException(ex.ToString());
                }
                finally
                {
                    Tran.Dispose();
                    cmd.Dispose();
                    Conn.Dispose();
                    Conn.Close();
                }
            }
            return rInt;
        }
Пример #6
0
 /// <summary>
 /// 新增/删除/修改 sys_Event
 /// </summary>
 /// <param name="fam">sys_EventTable实体类</param>
 /// <returns>返回0操正常</returns>
 public static int sys_EventInsertUpdate(sys_EventTable fam)
 {
     return DataProvider.Instance().sys_EventInsertUpdate(fam);
 }
Пример #7
0
 /// <summary>
 /// 根据ID返回 sys_EventTable实体类 单笔资料
 /// </summary>
 /// <param name="EventID">事件ID号</param>
 /// <returns>返回sys_EventTable实体类 EventID为0则无记录</returns>
 public static sys_EventTable sys_EventDisp(int EventID)
 {
     sys_EventTable fam = new sys_EventTable();
     QueryParam qp = new QueryParam();
     qp.PageIndex = 1;
     qp.PageSize = 1;
     qp.Where = " Where sys_Event.EventID = " + EventID;
     int RecordCount = 0;
     ArrayList lst = sys_EventList(qp, out RecordCount);
     if (RecordCount > 0)
     {
         fam = (sys_EventTable)lst[0];
     }
     return fam;
 }
Пример #8
0
 /// <summary>
 /// 新增/删除/修改 sys_Event
 /// </summary>
 /// <param name="fam">sys_EventTable实体类</param>
 /// <returns>返回0操正常</returns>
 public override int sys_EventInsertUpdate(sys_EventTable fam)
 {
     int rInt = 0;
     using (SqlConnection Conn = GetSqlConnection())
     {
         SqlCommand cmd = new SqlCommand("sys_EventInsertUpdateDelete", Conn);
         cmd.CommandType = CommandType.StoredProcedure;
         //设置参数
         cmd.Parameters.Add("@DB_Option_Action_", SqlDbType.NVarChar).Value = fam.DB_Option_Action_; //操作方法 Insert:增加 Update:修改 Delete:删除 Disp:显示单笔记录
         cmd.Parameters.Add("@EventID", SqlDbType.Int).Value = fam.EventID;  //事件ID号
         cmd.Parameters.Add("@E_U_LoginName", SqlDbType.NVarChar).Value = fam.E_U_LoginName;  //用户名
         cmd.Parameters.Add("@E_UserID", SqlDbType.Int).Value = fam.E_UserID;  //操作时用户ID与sys_Users中UserID
         cmd.Parameters.Add("@E_DateTime", SqlDbType.DateTime).Value = fam.E_DateTime;  //事件发生的日期及时间
         cmd.Parameters.Add("@E_ApplicationID", SqlDbType.Int).Value = fam.E_ApplicationID;  //所属应用程序ID与sys_Applicatio
         cmd.Parameters.Add("@E_A_AppName", SqlDbType.NVarChar).Value = fam.E_A_AppName;  //所属应用名称
         cmd.Parameters.Add("@E_M_Name", SqlDbType.NVarChar).Value = fam.E_M_Name;  //PageCode模块名称与sys_Module相同	
         cmd.Parameters.Add("@E_M_PageCode", SqlDbType.VarChar).Value = fam.E_M_PageCode;  //发生事件时模块名称
         cmd.Parameters.Add("@E_From", SqlDbType.NVarChar).Value = fam.E_From;  //来源
         cmd.Parameters.Add("@E_Type", SqlDbType.Int).Value = fam.E_Type;  //日记类型,1:操作日记2:安全日志3	
         cmd.Parameters.Add("@E_IP", SqlDbType.VarChar).Value = fam.E_IP;  //客户端IP地址
         cmd.Parameters.Add("@E_Record", SqlDbType.NVarChar).Value = fam.E_Record;  //详细描述
         Conn.Open();
         rInt = Convert.ToInt32(cmd.ExecuteScalar());
         cmd.Dispose();
         Conn.Dispose();
         Conn.Close();
     }
     return rInt;
 }
Пример #9
0
 /// <summary>
 /// 写入日志到DB
 /// </summary>
 /// <param name="E_Type">日志类型:日记类型,1:操作日记2:安全日志</param>
 /// <param name="E_Record">日志内容</param>
 /// <param name="userid">关联用户id</param>
 public static void EventWriteDB(int E_Type, string E_Record, int userid)
 {
     sys_EventTable s_Et = new sys_EventTable();
     s_Et.E_DateTime = DateTime.Now;
     s_Et.E_From = Common.GetScriptUrl;
     s_Et.E_IP = Common.GetIPAddress();
     s_Et.E_Record = E_Record;
     s_Et.E_UserID = userid;
     s_Et.E_U_LoginName = UserData.Get_sys_UserTable(s_Et.E_UserID).U_LoginName;
     s_Et.E_Type = E_Type;
     s_Et.DB_Option_Action_ = "Insert";
     Permission PMI = FrameWorkPermission.Get_Permission;
     if (PMI != null)
     {
         s_Et.E_ApplicationID = PMI.ApplicationID;
         s_Et.E_A_AppName = BusinessFacade.sys_ApplicationsDisp(PMI.ApplicationID).A_AppName;
         s_Et.E_M_PageCode = PMI.PageCode;
         s_Et.E_M_Name = BusinessFacade.sys_ModuleDisp(PMI.ApplicationID, PMI.PageCode).M_CName;
     }
     BusinessFacade.sys_EventInsertUpdate(s_Et);
 }