Ejemplo n.º 1
0
        public List <ENT.MeterSlaveMaster> GetTopOneRecord(ENT.MeterSlaveMaster objENT)
        {
            List <ENT.MeterSlaveMaster> lstENT = new List <ENT.MeterSlaveMaster>();

            try
            {
                sqlCMD             = new SqlCommand();
                sqlCMD.CommandText = "GetMeterSlaveMaster";
                sqlCMD.Parameters.AddWithValue("@ID", objENT.ID);
                sqlCMD.Parameters.AddWithValue("@Mode", objENT.Mode);
                lstENT = DBHelper.GetEntityList <ENT.MeterSlaveMaster>(sqlCMD);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(lstENT);
        }
Ejemplo n.º 2
0
        public bool InsertUpdateDeleteMeterSlaveMaster(ENT.MeterSlaveMaster objENT)
        {
            bool row = false;

            try
            {
                sqlCMD             = new SqlCommand();
                sqlCMD.CommandText = "InsertUpdateDeleteMeterSlaveMaster";
                sqlCMD.Parameters.AddWithValue("@ID", objENT.ID);
                sqlCMD.Parameters.AddWithValue("@Address", objENT.Address);
                sqlCMD.Parameters.AddWithValue("@DataDate", objENT.DataDate);
                sqlCMD.Parameters.AddWithValue("@DataValue", objENT.DataValue);
                sqlCMD.Parameters.AddWithValue("@MeterID", objENT.MeterID);
                sqlCMD.Parameters.AddWithValue("@Mode", objENT.Mode);
                row = objCRUD.InsertUpdateDelete(sqlCMD);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(row);
        }