Beispiel #1
0
        public List <HT_LogInfo> GetList(HT_LogInfo pHT_LogInfo)
        {
            List <HT_LogInfo> oHT_LogInfoList = new List <HT_LogInfo>();
            DataTable         dtb             = Get(pHT_LogInfo);

            if (dtb != null)
            {
                for (int i = 0; i < dtb.Rows.Count; i++)
                {
                    oHT_LogInfo = new HT_LogInfo();

                    oHT_LogInfo.HT_LogID   = long.Parse(dtb.Rows[i]["HT_LogID"].ToString());
                    oHT_LogInfo.Tag        = dtb.Rows[i]["Tag"].ToString();
                    oHT_LogInfo.SuKien     = dtb.Rows[i]["SuKien"].ToString();
                    oHT_LogInfo.NoiDung    = dtb.Rows[i]["NoiDung"].ToString();
                    oHT_LogInfo.ThoiDiem   = DateTime.Parse(dtb.Rows[i]["ThoiDiem"].ToString());
                    oHT_LogInfo.UserName   = dtb.Rows[i]["UserName"].ToString();
                    oHT_LogInfo.IPMayTram  = dtb.Rows[i]["IPMayTram"].ToString();
                    oHT_LogInfo.MacMayTram = dtb.Rows[i]["MacMayTram"].ToString();

                    oHT_LogInfoList.Add(oHT_LogInfo);
                }
            }
            return(oHT_LogInfoList);
        }
        public void Delete(HT_LogInfo pHT_LogInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@HT_LogID", SqlDbType.BigInt, pHT_LogInfo.HT_LogID));

            RunProcedure("sp_HT_Log_Delete", colParam);
        }
        public DataTable Get(HT_LogInfo pHT_LogInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@HT_LogID", SqlDbType.BigInt, pHT_LogInfo.HT_LogID));

            return(RunProcedureGet("sp_HT_Log_Get", colParam));
        }
Beispiel #4
0
        public int Add(HT_LogInfo pHT_LogInfo)
        {
            int ID = 0;

            ID            = oDHT_Log.Add(pHT_LogInfo);
            mErrorMessage = oDHT_Log.ErrorMessages;
            mErrorNumber  = oDHT_Log.ErrorNumber;
            return(ID);
        }
Beispiel #5
0
        public int Add(HT_LogInfo pHT_LogInfo)
        {
            int ID     = 0;
            var client = new UnimOsServiceClient();

            ID = client.cDHT_Log_Add(GlobalVar.MaXacThuc, pHT_LogInfo);
            client.Close();
            mErrorMessage = oDHT_Log.ErrorMessages;
            mErrorNumber  = oDHT_Log.ErrorNumber;
            return(ID);
        }
Beispiel #6
0
        //public void Update(HT_LogInfo pHT_LogInfo)
        //{
        //    var client = new UnimOsServiceClient();
        //    client.cDHT_Log_Update(GlobalVar.MaXacThuc, pHT_LogInfo);
        //    client.Close();
        //    mErrorMessage = oDHT_Log.ErrorMessages;
        //    mErrorNumber = oDHT_Log.ErrorNumber;
        //}

        //public void Delete(HT_LogInfo pHT_LogInfo)
        //{
        //    var client = new UnimOsServiceClient();
        //    client.cDHT_Log_Delete(GlobalVar.MaXacThuc, pHT_LogInfo);
        //    client.Close();
        //    mErrorMessage = oDHT_Log.ErrorMessages;
        //    mErrorNumber = oDHT_Log.ErrorNumber;
        //}

        //public List<HT_LogInfo> GetList(HT_LogInfo pHT_LogInfo)
        //{
        //    List<HT_LogInfo> oHT_LogInfoList = new List<HT_LogInfo>();
        //    DataTable dtb = Get(pHT_LogInfo);
        //    if (dtb != null)
        //    {
        //        for (int i = 0; i < dtb.Rows.Count; i++)
        //        {
        //            oHT_LogInfo = new HT_LogInfo();

        //            oHT_LogInfo.HT_LogID = long.Parse(dtb.Rows[i]["HT_LogID"].ToString());
        //            oHT_LogInfo.Tag = dtb.Rows[i]["Tag"].ToString();
        //            oHT_LogInfo.SuKien = dtb.Rows[i]["SuKien"].ToString();
        //            oHT_LogInfo.NoiDung = dtb.Rows[i]["NoiDung"].ToString();
        //            oHT_LogInfo.ThoiDiem = DateTime.Parse(dtb.Rows[i]["ThoiDiem"].ToString());
        //            oHT_LogInfo.UserName = dtb.Rows[i]["UserName"].ToString();
        //            oHT_LogInfo.IPMayTram = dtb.Rows[i]["IPMayTram"].ToString();
        //            oHT_LogInfo.MacMayTram = dtb.Rows[i]["MacMayTram"].ToString();

        //            oHT_LogInfoList.Add(oHT_LogInfo);
        //        }
        //    }
        //    return oHT_LogInfoList;
        //}

        //public void ToDataRow(HT_LogInfo pHT_LogInfo, ref DataRow dr)
        //{

        //    dr[pHT_LogInfo.strHT_LogID] = pHT_LogInfo.HT_LogID;
        //    dr[pHT_LogInfo.strTag] = pHT_LogInfo.Tag;
        //    dr[pHT_LogInfo.strSuKien] = pHT_LogInfo.SuKien;
        //    dr[pHT_LogInfo.strNoiDung] = pHT_LogInfo.NoiDung;
        //    dr[pHT_LogInfo.strThoiDiem] = pHT_LogInfo.ThoiDiem;
        //    dr[pHT_LogInfo.strUserName] = pHT_LogInfo.UserName;
        //    dr[pHT_LogInfo.strIPMayTram] = pHT_LogInfo.IPMayTram;
        //    dr[pHT_LogInfo.strMacMayTram] = pHT_LogInfo.MacMayTram;
        //}

        public void ToInfo(ref HT_LogInfo pHT_LogInfo, DataRow dr)
        {
            pHT_LogInfo.HT_LogID   = long.Parse(dr[pHT_LogInfo.strHT_LogID].ToString());
            pHT_LogInfo.Tag        = dr[pHT_LogInfo.strTag].ToString();
            pHT_LogInfo.SuKien     = dr[pHT_LogInfo.strSuKien].ToString();
            pHT_LogInfo.NoiDung    = dr[pHT_LogInfo.strNoiDung].ToString();
            pHT_LogInfo.ThoiDiem   = DateTime.Parse(dr[pHT_LogInfo.strThoiDiem].ToString());
            pHT_LogInfo.UserName   = dr[pHT_LogInfo.strUserName].ToString();
            pHT_LogInfo.IPMayTram  = dr[pHT_LogInfo.strIPMayTram].ToString();
            pHT_LogInfo.MacMayTram = dr[pHT_LogInfo.strMacMayTram].ToString();
        }
Beispiel #7
0
 public void ToDataRow(HT_LogInfo pHT_LogInfo, ref DataRow dr)
 {
     dr[pHT_LogInfo.strHT_LogID]   = pHT_LogInfo.HT_LogID;
     dr[pHT_LogInfo.strTag]        = pHT_LogInfo.Tag;
     dr[pHT_LogInfo.strSuKien]     = pHT_LogInfo.SuKien;
     dr[pHT_LogInfo.strNoiDung]    = pHT_LogInfo.NoiDung;
     dr[pHT_LogInfo.strThoiDiem]   = pHT_LogInfo.ThoiDiem;
     dr[pHT_LogInfo.strUserName]   = pHT_LogInfo.UserName;
     dr[pHT_LogInfo.strIPMayTram]  = pHT_LogInfo.IPMayTram;
     dr[pHT_LogInfo.strMacMayTram] = pHT_LogInfo.MacMayTram;
 }
Beispiel #8
0
        public frmTraCuuLog()
        {
            InitializeComponent();

            oBPhanHe      = new cBHT_PhanHe();
            pPhanHeInfo   = new HT_PhanHeInfo();
            oBChucNang    = new cBHT_ChucNang();
            pChucNangInfo = new HT_ChucNangInfo();
            pHT_LogInfo   = new HT_LogInfo();
            oBHT_Log      = new cBHT_Log();
            pHT_UserInfo  = new HT_UserInfo();
            oBHT_User     = new cBHT_User();
        }
        public void Update(HT_LogInfo pHT_LogInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@Tag", SqlDbType.NVarChar, pHT_LogInfo.Tag));
            colParam.Add(CreateParam("@SuKien", SqlDbType.NVarChar, pHT_LogInfo.SuKien));
            colParam.Add(CreateParam("@NoiDung", SqlDbType.NText, pHT_LogInfo.NoiDung));
            colParam.Add(CreateParam("@ThoiDiem", SqlDbType.DateTime, pHT_LogInfo.ThoiDiem));
            colParam.Add(CreateParam("@UserName", SqlDbType.NVarChar, pHT_LogInfo.UserName));
            colParam.Add(CreateParam("@IPMayTram", SqlDbType.NVarChar, pHT_LogInfo.IPMayTram));
            colParam.Add(CreateParam("@MacMayTram", SqlDbType.NVarChar, pHT_LogInfo.MacMayTram));
            colParam.Add(CreateParam("@HT_LogID", SqlDbType.BigInt, pHT_LogInfo.HT_LogID));

            RunProcedure("sp_HT_Log_Update", colParam);
        }
        public int Add(HT_LogInfo pHT_LogInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@Tag", SqlDbType.NVarChar, pHT_LogInfo.Tag));
            colParam.Add(CreateParam("@SuKien", SqlDbType.NVarChar, pHT_LogInfo.SuKien));
            colParam.Add(CreateParam("@NoiDung", SqlDbType.NText, pHT_LogInfo.NoiDung));
            colParam.Add(CreateParam("@ThoiDiem", SqlDbType.DateTime, pHT_LogInfo.ThoiDiem));
            colParam.Add(CreateParam("@UserName", SqlDbType.NVarChar, pHT_LogInfo.UserName));
            colParam.Add(CreateParam("@IPMayTram", SqlDbType.NVarChar, pHT_LogInfo.IPMayTram));
            colParam.Add(CreateParam("@MacMayTram", SqlDbType.NVarChar, pHT_LogInfo.MacMayTram));
            colParam.Add(CreateParamOut("@ID", SqlDbType.Int));

            return((int)RunProcedureOut("sp_HT_Log_Add", colParam));
        }
Beispiel #11
0
 public void Delete(HT_LogInfo pHT_LogInfo)
 {
     oDHT_Log.Delete(pHT_LogInfo);
     mErrorMessage = oDHT_Log.ErrorMessages;
     mErrorNumber  = oDHT_Log.ErrorNumber;
 }
Beispiel #12
0
 public void Update(HT_LogInfo pHT_LogInfo)
 {
     oDHT_Log.Update(pHT_LogInfo);
     mErrorMessage = oDHT_Log.ErrorMessages;
     mErrorNumber  = oDHT_Log.ErrorNumber;
 }
Beispiel #13
0
 public DataTable Get(HT_LogInfo pHT_LogInfo)
 {
     return(oDHT_Log.Get(pHT_LogInfo));
 }