using System; using System.Collections.Generic; using CnasSynchronousCommon; using CnasSynchronusClient; using CnasSynchrousModel; namespace CNAS_BalanceClient { interface ILaboratoryTestOpera { ReturnValue CreateLaboratoryTestData(string strCode); } public class QuanShuiFenOpera : ILaboratoryTestOpera { public ReturnValue CreateLaboratoryTestData(string strCode) { ReturnValue returnValue = new ReturnValue(); LaboratoryTest laboratory = new LaboratoryTest(); laboratory.GUID = Guid.NewGuid().ToString(); laboratory.Sample_Number = strCode; laboratory.DataType = "ARB"; laboratory.Granularity = "6mm"; laboratory.Operator = GlobalCommonOperation.strUserName; laboratory.OperationType = "Add"; if (returnValue.LstValue == null) returnValue.LstValue = new List(); returnValue.LstValue.Add(laboratory); return returnValue; } } public class ShuiFenOpera : ILaboratoryTestOpera { public ReturnValue CreateLaboratoryTestData(string strCode) { ReturnValue returnValue = new ReturnValue(); LaboratoryTest laboratory = new LaboratoryTest(); laboratory.GUID = Guid.NewGuid().ToString(); laboratory.Sample_Number = strCode; laboratory.DataType = "Moisture"; laboratory.Operator = GlobalCommonOperation.strUserName; laboratory.OperationType = "Add"; if (returnValue.LstValue == null) returnValue.LstValue = new List(); returnValue.LstValue.Add(laboratory); return returnValue; } } public class HuiFenOpera : ILaboratoryTestOpera { public ReturnValue CreateLaboratoryTestData(string strCode) { ReturnValue returnValue = new ReturnValue(); LaboratoryTest laboratory = new LaboratoryTest(); laboratory.GUID = Guid.NewGuid().ToString(); laboratory.Sample_Number = strCode; laboratory.DataType = "Ash"; laboratory.Operator = GlobalCommonOperation.strUserName; laboratory.OperationType = "Add"; if (returnValue.LstValue == null) returnValue.LstValue = new List(); returnValue.LstValue.Add(laboratory); return returnValue; } } public class HuiFaFenOpera : ILaboratoryTestOpera { public ReturnValue CreateLaboratoryTestData(string strCode) { ReturnValue returnValue = new ReturnValue(); LaboratoryTest laboratory = new LaboratoryTest(); laboratory.GUID = Guid.NewGuid().ToString(); laboratory.Sample_Number = strCode; laboratory.DataType = "Volatile"; laboratory.Operator = GlobalCommonOperation.strUserName; laboratory.OperationType = "Add"; if (returnValue.LstValue == null) returnValue.LstValue = new List(); returnValue.LstValue.Add(laboratory); return returnValue; } } public class CrucibleHeatOpera : ILaboratoryTestOpera { public ReturnValue CreateLaboratoryTestData(string strCode) { ReturnValue returnValue = new ReturnValue(); LaboratoryTest laboratory = new LaboratoryTest(); laboratory.GUID = Guid.NewGuid().ToString(); laboratory.Sample_Number = strCode; laboratory.DataType = "Crucible|Heat"; laboratory.DataMold = "临时"; laboratory.Operator = GlobalCommonOperation.strUserName; laboratory.OperationType = "Add"; if (returnValue.LstValue == null) returnValue.LstValue = new List(); returnValue.LstValue.Add(laboratory); return returnValue; } public ReturnValue CreateLaboratoryTestData(string strCode, string strCrucible) { ReturnValue returnValue = new ReturnValue(); LaboratoryTest laboratory = new LaboratoryTest(); laboratory.GUID = Guid.NewGuid().ToString(); laboratory.Sample_Number = strCode; laboratory.Crucible_Number = strCrucible; laboratory.DataType = "Crucible|Heat"; laboratory.WeighingType = "FRL"; laboratory.DataMold = "临时"; laboratory.Operator = GlobalCommonOperation.strUserName; laboratory.OperationType = "Add"; if (returnValue.LstValue == null) returnValue.LstValue = new List(); returnValue.LstValue.Add(laboratory); return returnValue; } } public class CrucibleSulfurOpera : ILaboratoryTestOpera { public ReturnValue CreateLaboratoryTestData(string strCode) { ReturnValue returnValue = new ReturnValue(); LaboratoryTest laboratory = new LaboratoryTest(); laboratory.GUID = Guid.NewGuid().ToString(); laboratory.Sample_Number = strCode; laboratory.DataType = "Crucible|Sulfur"; laboratory.DataMold = "临时"; laboratory.Operator = GlobalCommonOperation.strUserName; laboratory.OperationType = "Add"; if (returnValue.LstValue == null) returnValue.LstValue = new List(); returnValue.LstValue.Add(laboratory); return returnValue; } public ReturnValue CreateLaboratoryTestData(string strCode, string strCrucible) { ReturnValue returnValue = new ReturnValue(); LaboratoryTest laboratory = new LaboratoryTest(); laboratory.GUID = Guid.NewGuid().ToString(); laboratory.Sample_Number = strCode; laboratory.Crucible_Number = strCrucible; laboratory.DataType = "Crucible|Sulfur"; laboratory.WeighingType = "CLY"; laboratory.DataMold = "临时"; laboratory.Operator = GlobalCommonOperation.strUserName; laboratory.OperationType = "Add"; if (returnValue.LstValue == null) returnValue.LstValue = new List(); returnValue.LstValue.Add(laboratory); return returnValue; } } public class CrucibleHydrogenOpera : ILaboratoryTestOpera { public ReturnValue CreateLaboratoryTestData(string strCode) { ReturnValue returnValue = new ReturnValue(); LaboratoryTest laboratory = new LaboratoryTest(); laboratory.GUID = Guid.NewGuid().ToString(); laboratory.Sample_Number = strCode; laboratory.DataType = "Crucible|Hydrogen"; laboratory.DataMold = "临时"; laboratory.Operator = GlobalCommonOperation.strUserName; laboratory.OperationType = "Add"; if (returnValue.LstValue == null) returnValue.LstValue = new List(); returnValue.LstValue.Add(laboratory); return returnValue; } public ReturnValue CreateLaboratoryTestData(string strCode, string strCrucible) { ReturnValue returnValue = new ReturnValue(); LaboratoryTest laboratory = new LaboratoryTest(); laboratory.GUID = Guid.NewGuid().ToString(); laboratory.Sample_Number = strCode; laboratory.Crucible_Number = strCrucible; laboratory.WeighingType = "CHN"; laboratory.DataType = "Crucible|Hydrogen"; laboratory.DataMold = "临时"; laboratory.Operator = GlobalCommonOperation.strUserName; laboratory.OperationType = "Add"; if (returnValue.LstValue == null) returnValue.LstValue = new List(); returnValue.LstValue.Add(laboratory); return returnValue; } } }