コード例 #1
0
        private void DeleteWorkersForDay()
        {
            xlUpload2DB Upload2DB = new xlUpload2DB();
            string      strSQL    = "Delete From Schedule where day ='" + FormatDate() + "'";

            Upload2DB.ExecuteScalar(strSQL, objConnection);
        }
コード例 #2
0
        private void getTimes(string strShift, ref string strTimeIn, ref string strTimeOut)
        {
            xlUpload2DB Upload2DB = new xlUpload2DB();

            string[] arShift = strShift.Split('-');
            strTimeIn  = Convert24Hr(arShift[0]);
            strTimeOut = Convert24Hr(arShift[1]);
        }
コード例 #3
0
        private void UploadPerson2Schedule(string strWorker, string strTime, string strZone)
        {
            string      strSQL    = "";
            xlUpload2DB Upload2DB = new xlUpload2DB();

            string strTimeIn = "", strTimeOut = "";

            getTimes(strTime, ref strTimeIn, ref strTimeOut);
            string strDt = FormatDate();

            strSQL = "call addSchedule_Auto('" + strWorker + "','" + strZone + "','" + strDt + "','" + strTimeIn + "','" + strTimeOut + "')";

            int intRow = Upload2DB.ExecuteScalar(strSQL, objConnection);

            if (intRow == 0)
            {
                strErrors = strErrors + "|" + strWorker + " - " + strTimeIn + "-" + strTimeOut + " - Zone=" + strZone;
            }
        }