private void DistributeQmt_Hour(DateTime oDate, string deviceID, double oVal) { // "Hour23_TrafficArea", "Hour23_IndustrialArea", "Hour23_ResidentialArea", "Hour23_AllArea", //string QmtIndex = "Hour" + oDate.ToString("HH") + "_" + deviceID; string QmtIndex = TankFactory.Get_QmtIdx_TmuDi(oDate, "Hour", deviceID); AddDateAndValueToQmt(oDate, oVal, QmtIndex); //if (Dic_Qmt.TryGetValue(t, out QuickMixTank Qmt)) //{ // // Add // Qmt.List_Dt.Add(oDate); // Qmt.Ts.Add(oVal); //} //else //{ // // Exception // throw new Exception(); //} // Special Area //if (isTrafficArea(deviceID)) //{ // AddDateAndValueToQmt(oDate, oVal, QmtIndex + "_TrafficArea"); //} //if (isIndustrialArea(deviceID)) //{ // AddDateAndValueToQmt(oDate, oVal, QmtIndex + "_IndustrialArea"); //} //if (isResidentialArea(deviceID)) //{ // AddDateAndValueToQmt(oDate, oVal, QmtIndex + "_ResidentialArea"); //} }
private void DistributeQmt_Month(DateTime oDate, string deviceID, double oVal) { //string QmtIndex = "Month_" + oDate.ToString("MM"); string QmtIndex = TankFactory.Get_QmtIdx_TmuDi(oDate, "Month", deviceID); AddDateAndValueToQmt(oDate, oVal, QmtIndex); //// Special Area //if (isTrafficArea(deviceID)) //{ // AddDateAndValueToQmt(oDate, oVal, QmtIndex + "_TrafficArea"); //} //if (isIndustrialArea(deviceID)) //{ // AddDateAndValueToQmt(oDate, oVal, QmtIndex + "_IndustrialArea"); //} //if (isResidentialArea(deviceID)) //{ // AddDateAndValueToQmt(oDate, oVal, QmtIndex + "_ResidentialArea"); //} }
private void DistributeQmt_Week(DateTime oDate, string deviceID, double oVal) { //DayOfWeek day = CultureInfo.InvariantCulture.Calendar.GetDayOfWeek(oDate); //int result = (int)day; //string QmtIndex = "Week_" + result.ToString("00"); string QmtIndex = TankFactory.Get_QmtIdx_TmuDi(oDate, "Week", deviceID); AddDateAndValueToQmt(oDate, oVal, QmtIndex); //// Special Area //if (isTrafficArea(deviceID)) //{ // AddDateAndValueToQmt(oDate, oVal, QmtIndex + "_TrafficArea"); //} //if (isIndustrialArea(deviceID)) //{ // AddDateAndValueToQmt(oDate, oVal, QmtIndex + "_IndustrialArea"); //} //if (isResidentialArea(deviceID)) //{ // AddDateAndValueToQmt(oDate, oVal, QmtIndex + "_ResidentialArea"); //} }