Example #1
0
        public void getSERSHeader(string selSERSNo)
        {
            DBConnection    dbCon         = new DBConnection();
            cLocation       oLocation     = new cLocation();
            cCompany        oCompany      = new cCompany();
            cMySQLCommands  oMySQLCommand = new cMySQLCommands();
            MySqlDataReader reader;

            oMySQLCommand.addFields("sers_tran.rsh_dreq");
            oMySQLCommand.addFields("sers_tran.rsh_dneed");
            oMySQLCommand.addFields("sers_tran.rsh_loccd");
            oMySQLCommand.addFields("sers_tran.rsh_depcd");
            oMySQLCommand.addFields("sers_tran.rsh_dstamp");
            oMySQLCommand.addFields("sers_tran.rsh_stat");
            oMySQLCommand.addFields("usertab.usr_name");
            oMySQLCommand.addFields("sers_tran.rsh_rem");
            oMySQLCommand.addFields("sers_tran.rsh_type");
            oMySQLCommand.addFields("sers_tran.rsh_apprby");


            oMySQLCommand._tblName        = "sers_tran";
            oMySQLCommand._innerTableName = "usertab";
            oMySQLCommand._innerLeftOn    = "sers_tran.rsh_uid";
            oMySQLCommand._innerRightOn   = "usertab.usr_login";
            oMySQLCommand._condition      = "sers_tran.rsh_no = '" + selSERSNo + "'";

            reader = oMySQLCommand.innerSelectQueryWhere();
            if (reader.HasRows)
            {
                while (reader.Read())
                {
                    _dateRequested = reader.GetString(0);
                    _dateNeeded    = reader.GetString(1);
                    _loccode       = reader.GetString(2);
                    _deptcode      = reader.GetString(3);
                    _datestamp     = reader.GetString(4);
                    _status        = reader.GetString(5);
                    _uid           = reader.GetString(6);
                    _remarks       = reader.GetString(7);
                    _sersType      = reader.GetString(8);
                    //_noOfCopies = reader.GetString(25);
                    _approvedBy = reader.GetString(9);
                }
            }

            ////getLocation();
            //getCompany();
        }
Example #2
0
        public void addEventEntry()
        {
            cLocation oLocation = new cLocation();

            oLocation._code = _locCode;
            oLocation.setLocationDetails();

            cMySQLCommands oMySQLCommands = new cMySQLCommands();

            oMySQLCommands._tblName = "eventlog";
            oMySQLCommands.addFields("eventtime");
            oMySQLCommands.addFields("eventname");
            oMySQLCommands._values = "";
            oMySQLCommands.addValues(_logEventDateTime);
            oMySQLCommands.addValues(oLocation._name.TrimEnd() + " has " + _logEventCount + "entries of " + _logEventName);
            oMySQLCommands.insertQuery();
        }