Exemplo n.º 1
0
        public DataSet RfidSave(string rfidTags)
        {
            try
            {
                DataSet dataResult = new DataSet();
                dbconn = new DatabaseConnection();
                dbconn.DatabaseConn(SP_RFIDSAVE);

                if (dbconn.sqlConn.State == ConnectionState.Open)
                {
                    dbconn.sqlConn.Close();
                }
                dbconn.sqlConn.Open();
                dbconn.sqlComm.Parameters.Clear();
                dbconn.sqlComm.Parameters.AddWithValue("@RFIDTags", rfidTags);

                SqlDataAdapter da = new SqlDataAdapter();
                da.SelectCommand = dbconn.sqlComm;
                da.Fill(dataResult);
                dbconn.sqlConn.Close();
                return(dataResult);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
        public DataSet EclockEntrySave(DomainObjects.Entry entry)
        {
            try
            {
                DataSet dataResult = new DataSet();
                dbconn = new DatabaseConnection();
                dbconn.DatabaseConn("EclockEntryGlobalSave");

                if (dbconn.sqlConn.State == ConnectionState.Open)
                {
                    dbconn.sqlConn.Close();
                }
                dbconn.sqlConn.Open();
                dbconn.sqlComm.Parameters.Clear();
                dbconn.sqlComm.Parameters.AddWithValue("@ClubName", entry.Clubname);
                dbconn.sqlComm.Parameters.AddWithValue("@RFID", entry.RFID);
                dbconn.sqlComm.Parameters.AddWithValue("@MemberIDNo", entry.MemberIDNo);
                dbconn.sqlComm.Parameters.AddWithValue("@BirdCategory", entry.RaceCategoryName);
                dbconn.sqlComm.Parameters.AddWithValue("@DateRelease", entry.ReleaseDate);
                dbconn.sqlComm.Parameters.AddWithValue("@RingNumber", entry.RingNumber);
                dbconn.sqlComm.Parameters.AddWithValue("@MobileNumber", entry.MobileNumber);

                SqlDataAdapter da = new SqlDataAdapter();
                da.SelectCommand = dbconn.sqlComm;
                da.Fill(dataResult);
                dbconn.sqlConn.Close();
                return(dataResult);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 3
0
        public DataSet EclockResultSave(DomainObjects.Result result)
        {
            try
            {
                DataSet dataResult = new DataSet();
                dbconn = new DatabaseConnection();
                dbconn.DatabaseConn("EclockCommand");

                if (dbconn.sqlConn.State == ConnectionState.Open)
                {
                    dbconn.sqlConn.Close();
                }
                dbconn.sqlConn.Open();
                dbconn.sqlComm.Parameters.Clear();
                dbconn.sqlComm.Parameters.AddWithValue("@SMSContent", result.SMSContent);
                dbconn.sqlComm.Parameters.AddWithValue("@ActionFrom", result.ActionFrom);
                dbconn.sqlComm.Parameters.AddWithValue("@ClubName", result.ClubName);

                SqlDataAdapter da = new SqlDataAdapter();
                da.SelectCommand = dbconn.sqlComm;
                da.Fill(dataResult);
                dbconn.sqlConn.Close();
                return(dataResult);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }