Esempio n. 1
0
        public DataUploadHelper Create(string uploadTypeName, DataUploaderSetting uploaderSetting)
        {
            switch (uploadTypeName)
            {
            case "AVC":
                var avc = new AvcDataUploadHelper();
                if (uploaderSetting != null)
                {
                    avc.SetDataProp("IPAddr", uploaderSetting.AVC_FTP);
                    avc.SetDataProp("IPAddr", uploaderSetting.AVC_Part_ID);
                    avc.SetDataProp("IPAddr", uploaderSetting.AVC_Machine_ID);
                    avc.SetDataProp("IPAddr", uploaderSetting.AVC_Operator_ID);
                }

                return(avc);

            case "CM":
                var cm = new CMDataUploadHelper();
                if (uploaderSetting != null)
                {
                    cm.SetDataProp("CM", uploaderSetting.CM_Setting);
                }

                return(cm);

            default:
                return(null);
            }
        }
        public static ICsvData Convert(ThermoProduct product, DataUploaderSetting uploaderSetting)
        {
            switch (uploaderSetting.UploaderName)
            {
            case "AVC":
                return(AvcConvert(product, uploaderSetting.AVC_Part_ID, uploaderSetting.AVC_Machine_ID));

                break;

            case "CM":
                return(CmConvert(product, uploaderSetting.CM_Machine_ID));

            default:
                return(null);
            }
        }