Пример #1
0
        /// <summary>
        /// 사용자 쿼리 실행
        /// </summary>
        public DataSet runUserQuery(string userQuery)
        {
            MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common dacCtlData = new MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common();
            DataSet DS = dacCtlData.runUserQuery_DB(userQuery);

            return(DS);
        }
Пример #2
0
        public int GetConnectLogCount(string dept_ref_id, string emp_name, string start_dt, string end_dt)
        {
            MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common dacCtlCommon = new MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common();
            int cnt;

            cnt = dacCtlCommon.SelectConnectLogCount(dept_ref_id, emp_name, start_dt, end_dt);

            return(cnt);
        }
Пример #3
0
        /// <summary>
        /// 접속정보 조회
        /// </summary>
        public DataTable GetConnectLog(string dept_ref_id, string emp_name, string start_dt, string end_dt, int iFirstRow, int iLastRow)
        {
            MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common dacCtlCommon = new MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common();
            DataTable DT = new DataTable();

            DT = dacCtlCommon.SelectConnectLog(dept_ref_id, emp_name, start_dt, end_dt, iFirstRow, iLastRow);

            return(DT);
        }
Пример #4
0
        /// <summary>
        /// 접속정보 인서트
        /// </summary>
        public void AddConnectLog(string SESSION_ID, int EMP_REF_ID, string LOGIN_ID, string EMP_NAME, string CONNECT_IP, string SYS_NAME)
        {
            MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common dacCtlData = new MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common();

            if (dacCtlData.CheckConnectLog(SESSION_ID, LOGIN_ID) == 0)
            {
                dacCtlData.InsertConnectLog(SESSION_ID, EMP_REF_ID, LOGIN_ID, EMP_NAME, CONNECT_IP, SYS_NAME);
            }
        }
Пример #5
0
        public int AddMenuRole(DataTable dataTable
                               , object old_role_ref_id)
        {
            MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common _data = new MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common();

            int affectedRow = 0;

            IDbConnection conn = DbAgentHelper.CreateDbConnection();

            conn.Open();
            IDbTransaction trx = conn.BeginTransaction();

            try
            {
                foreach (DataRow dataRow in dataTable.Rows)
                {
                    _data.Delete_RoleMenu(conn
                                          , trx
                                          , old_role_ref_id
                                          , dataRow["MENU_REF_ID"]);

                    affectedRow += _data.Insert_RoleMenu(conn
                                                         , trx
                                                         , old_role_ref_id
                                                         , dataRow["MENU_REF_ID"]);
                }

                trx.Commit();
            }
            catch (Exception ex)
            {
                trx.Rollback();
                return(0);
            }
            finally
            {
                conn.Close();
            }

            return(affectedRow);
        }
Пример #6
0
        public static void SetDataFieldsX2(string query, string xField1, out ArrayList xValue1, string xField2, out ArrayList xValue2, string yField1, out ArrayList yValue1, string yField2, out ArrayList yValue2, string yField3, out ArrayList yValue3, string yField4, out ArrayList yValue4, string yField5, out ArrayList yValue5)
        {
            //SqlConnection myConnection = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["MainDB"].ConnectionString);
            //SqlCommand myCommand = new SqlCommand(query, myConnection);
            //myCommand.Connection.Open();
            //SqlDataReader myReader = myCommand.ExecuteReader();

            MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common dacCtlCommon = new MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common();
            DataTable dt = dacCtlCommon.runUserQuery_DB(query).Tables[0];

            xValue1 = new ArrayList();

            //if(xValue2 != null)
            xValue2 = new ArrayList();

            yValue1 = new ArrayList();

            //if(yValue2 != null)
            yValue2 = new ArrayList();
            //if(yValue3 != null)
            yValue3 = new ArrayList();
            //if (yValue4 != null)
            yValue4 = new ArrayList();
            //if (yValue5 != null)
            yValue5 = new ArrayList();

            //while (myReader.Read())
            //{
            //    xValue1.Add(myReader[xField1].ToString());
            //    if (xField2 != null)
            //        xValue2.Add(myReader[xField2].ToString());

            //    yValue1.Add(double.Parse(myReader[yField1].ToString()));

            //    if (yField2 != null)
            //        yValue2.Add(double.Parse(myReader[yField2].ToString()));
            //    if (yField3 != null)
            //        yValue3.Add(double.Parse(myReader[yField3].ToString()));
            //    if (yField4 != null)
            //        yValue4.Add(double.Parse(myReader[yField4].ToString()));
            //    if (yField5 != null)
            //        yValue5.Add(double.Parse(myReader[yField5].ToString()));
            //}

            //myReader.Close();
            //myConnection.Close();
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DataRow row = dt.Rows[i];

                xValue1.Add(row[xField1].ToString());
                if (xField2 != null)
                {
                    xValue2.Add(row[xField2].ToString());
                }

                yValue1.Add(double.Parse(row[yField1].ToString()));

                if (yField2 != null)
                {
                    yValue2.Add(double.Parse(row[yField2].ToString()));
                }
                if (yField3 != null)
                {
                    yValue3.Add(double.Parse(row[yField3].ToString()));
                }
                if (yField4 != null)
                {
                    yValue4.Add(double.Parse(row[yField4].ToString()));
                }
                if (yField5 != null)
                {
                    yValue5.Add(double.Parse(row[yField5].ToString()));
                }
            }
        }
Пример #7
0
        /// <summary>
        /// 접속정보 업데이트
        /// </summary>
        public void ModifyConnectLog(string SESSION_ID, string LOGIN_ID)
        {
            MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common dacCtlData = new MicroBSC.Integration.CTL.Dac.Dac_Ctl_Common();

            dacCtlData.UpdateConnectLog(SESSION_ID, LOGIN_ID);
        }