private string Result_18X05_ToXml(ResultParent result) { Vehicle_18X05_Result m_18X05_Result = (Vehicle_18X05_Result)result; ModelReflection mR = new ModelReflection(); string strRet = mR.ResultModelToXML(m_18X05_Result, "vehispara"); return(strRet); }
/// <summary> /// 18X05 Result /// </summary> /// <param name="result"></param> /// <param name="strResultContent"></param> /// <returns></returns> private Vehicle_18X05_Result Result_18X05_ToModel(ResultParent result, string strResultContent) { Vehicle_18X05_Result m_Result = (Vehicle_18X05_Result)result; if (string.IsNullOrEmpty(strResultContent)) { m_Result.code = "0"; m_Result.message = ""; return(m_Result); } ModelReflection mR = new ModelReflection(); m_Result = mR.ResultSetModelValue(m_Result, "vehispara", strResultContent); return(m_Result); }
/// <summary> /// 18X05 /// </summary> /// <param name="para"></param> /// <returns></returns> public Vehicle_18X05_Result AJ_Write_18X05(Vehicle_18X05_Para para) { AJ_IWrite aj_18X05 = new AJ_Write_WebServices(); if (!string.IsNullOrEmpty(para.hphm)) { if (para.hphm.Contains("挂")) { para.hphm = para.hphm.Replace("挂", ""); } if (para.hphm.Contains("学")) { para.hphm = para.hphm.Replace("学", ""); } if (para.hphm.Contains("警")) { para.hphm = para.hphm.Replace("警", ""); } } Vehicle_18X05_Result aj_18X05_Result = aj_18X05.Write_18X05(para); return(aj_18X05_Result); }
public ResultParent Result_XmlToModel(string strType, string strResultContent) { switch (strType) { case "18C49": Vehicle_18C49_Result m_18C49_result = new Vehicle_18C49_Result(); m_18C49_result = Result_18C49_ToModel(m_18C49_result, strResultContent); return(m_18C49_result); case "18C50": Vehicle_18C50_Result m_18C50_result = new Vehicle_18C50_Result(); m_18C50_result = Result_18C50_ToModel(m_18C50_result, strResultContent); return(m_18C50_result); case "18J11": Vehicle_18J11_Result m_18J11_result = new Vehicle_18J11_Result(); m_18J11_result = Result_18J11_ToModel(m_18J11_result, strResultContent); return(m_18J11_result); case "18J12": Vehicle_18J12_Result m_18J12_result = new Vehicle_18J12_Result(); m_18J12_result = Result_18J12_ToModel(m_18J12_result, strResultContent); return(m_18J12_result); case "18J52": Vehicle_18J52_Result m_18J52_result = new Vehicle_18J52_Result(); m_18J52_result = Result_18J52_ToModel(m_18J52_result, strResultContent); return(m_18J52_result); case "18C66": Vehicle_18C66_Result m_18C66_result = new Vehicle_18C66_Result(); m_18C66_result = Result_18C66_ToModel(m_18C66_result, strResultContent); return(m_18C66_result); case "18C82": Vehicle_18C82_Result m_18C82_result = new Vehicle_18C82_Result(); m_18C82_result = Result_18C82_ToModel(m_18C82_result, strResultContent); return(m_18C82_result); case "18C55": Vehicle_18C55_Result m_18C55_result = new Vehicle_18C55_Result(); m_18C55_result = Result_18C55_ToModel(m_18C55_result, strResultContent); return(m_18C55_result); case "18C58": Vehicle_18C58_Result m_18C58_result = new Vehicle_18C58_Result(); m_18C58_result = Result_18C58_ToModel(m_18C58_result, strResultContent); return(m_18C58_result); case "18C80": Vehicle_18C80_Result m_18C80_result = new Vehicle_18C80_Result(); m_18C80_result = Result_18C80_ToModel(m_18C80_result, strResultContent); return(m_18C80_result); case "18C81": Vehicle_18C81_Result m_18C81_result = new Vehicle_18C81_Result(); m_18C81_result = Result_18C81_ToModel(m_18C81_result, strResultContent); return(m_18C81_result); case "18J31": Vehicle_18J31_Result m_18J31_result = new Vehicle_18J31_Result(); m_18J31_result = Result_18J31_ToModel(m_18J31_result, strResultContent); return(m_18J31_result); case "18C62": Vehicle_18C62_Result m_18C62_result = new Vehicle_18C62_Result(); m_18C62_result = Result_18C62_ToModel(m_18C62_result, strResultContent); return(m_18C62_result); case "18C59": Vehicle_18C59_Result m_18C59_result = new Vehicle_18C59_Result(); m_18C59_result = Result_18C59_ToModel(m_18C59_result, strResultContent); return(m_18C59_result); case "18C65": Vehicle_18C65_Result m_18C65_result = new Vehicle_18C65_Result(); m_18C65_result = Result_18C65_ToModel(m_18C65_result, strResultContent); return(m_18C65_result); case "18C51": Vehicle_18C51_Result m_18C51_result = new Vehicle_18C51_Result(); m_18C51_result = Result_18C51_ToModel(m_18C51_result, strResultContent); return(m_18C51_result); case "18C52": Vehicle_18C52_Result m_18C52_result = new Vehicle_18C52_Result(); m_18C52_result = Result_18C52_ToModel(m_18C52_result, strResultContent); return(m_18C52_result); case "18C72": Vehicle_18C72_Result m_18C72_result = new Vehicle_18C72_Result(); m_18C72_result = Result_18C72_ToModel(m_18C72_result, strResultContent); return(m_18C72_result); case "18J80": Vehicle_18J80_Result m_18J80_result = new Vehicle_18J80_Result(); m_18J80_result = Result_18J80_ToModel(m_18J80_result, strResultContent); return(m_18J80_result); case "18X01": Vehicle_18X01_Result m_18X01_result = new Vehicle_18X01_Result(); m_18X01_result = Result_18X01_ToModel(m_18X01_result, strResultContent); return(m_18X01_result); case "18X02": Vehicle_18X02_Result m_18X02_result = new Vehicle_18X02_Result(); m_18X02_result = Result_18X02_ToModel(m_18X02_result, strResultContent); return(m_18X02_result); case "18X03": Vehicle_18X03_Result m_18X03_result = new Vehicle_18X03_Result(); m_18X03_result = Result_18X03_ToModel(m_18X03_result, strResultContent); return(m_18X03_result); case "18C54": Vehicle_18C54_Result m_18C54_result = new Vehicle_18C54_Result(); m_18C54_result = Result_18C54_ToModel(m_18C54_result, strResultContent); return(m_18C54_result); case "18X04": Vehicle_18X04_Result m_18X04_result = new Vehicle_18X04_Result(); m_18X04_result = Result_18X04_ToModel(m_18X04_result, strResultContent); return(m_18X04_result); case "18C63": Vehicle_18C63_Result m_18C63_result = new Vehicle_18C63_Result(); m_18C63_result = Result_18C63_ToModel(m_18C63_result, strResultContent); return(m_18C63_result); case "18X05": Vehicle_18X05_Result m_18X05_result = new Vehicle_18X05_Result(); m_18X05_result = Result_18X05_ToModel(m_18X05_result, strResultContent); return(m_18X05_result); case "18W05": Vehicle_18W05_Result m_18W05_result = new Vehicle_18W05_Result(); m_18W05_result = Result_18W05_ToModel(m_18W05_result, strResultContent); return(m_18W05_result); case "18W06": Vehicle_18W06_Result m_18W06_result = new Vehicle_18W06_Result(); m_18W06_result = Result_18W06_ToModel(m_18W06_result, strResultContent); return(m_18W06_result); } return(null); }
public Vehicle_18C58_Result AJ_Write_18C58(Vehicle_18C58_Para para) { AJ_IWrite aj_18C58 = new AJ_Write_WebServices(); if (!string.IsNullOrEmpty(para.hphm)) { if (para.hphm.Contains("挂")) { para.hphm = para.hphm.Replace("挂", ""); } if (para.hphm.Contains("学")) { para.hphm = para.hphm.Replace("学", ""); } if (para.hphm.Contains("警")) { para.hphm = para.hphm.Replace("警", ""); } } AdapterHelper adapter = new AdapterHelper(); Vehicle_18C58_Result aj_18C58_Result = aj_18C58.Write_18C58(para); #if RZLD if (aj_18C58_Result.code == "1") { Vehicle_18X05_Para m_18X05_Para = new Vehicle_18X05_Para("18X05", para.jkxlh, para.xtlb); m_18X05_Para.clsbdh = para.clsbdh; m_18X05_Para.hphm = para.hphm; m_18X05_Para.hpzl = para.hpzl; m_18X05_Para.jcxdh = para.jcxdh; m_18X05_Para.jssj = para.jssj; m_18X05_Para.jycs = para.jycs; m_18X05_Para.jyjgbh = para.jyjgbh; m_18X05_Para.jylsh = para.jylsh; m_18X05_Para.jyxm = para.jyxm; m_18X05_Para.kssj = para.kssj; m_18X05_Para.lxzl = adapter.GetLXLXByJYXM(para.jyxm); Vehicle_18X05_Result aj_18X05_Result = new Vehicle_18X05_Result(); if (para.jyxm == "Z1") { //整备质量,录像发两个 m_18X05_Para.lxzl = "0362"; //前 Vehicle_18X05_Result aj_18X05_Result_F = aj_18C58.Write_18X05(m_18X05_Para); m_18X05_Para.lxzl = "0363"; //后 Vehicle_18X05_Result aj_18X05_Result_B = aj_18C58.Write_18X05(m_18X05_Para); if (aj_18X05_Result_F.code == "1" && aj_18X05_Result_B.code == "1") { aj_18X05_Result.code = "1"; aj_18X05_Result.message = "前:" + aj_18X05_Result_F.message + " 后:" + aj_18X05_Result_B.message; } else { aj_18X05_Result.code = "0"; aj_18X05_Result.message = "前:" + aj_18X05_Result_F.message + " 后:" + aj_18X05_Result_B.message; } } else if (para.jyxm == "M1") { //外廓尺寸,录像发两个 m_18X05_Para.lxzl = "0360"; //前 Vehicle_18X05_Result aj_18X05_Result_F = aj_18C58.Write_18X05(m_18X05_Para); m_18X05_Para.lxzl = "0361"; //后 Vehicle_18X05_Result aj_18X05_Result_B = aj_18C58.Write_18X05(m_18X05_Para); if (aj_18X05_Result_F.code == "1" && aj_18X05_Result_B.code == "1") { aj_18X05_Result.code = "1"; aj_18X05_Result.message = "前:" + aj_18X05_Result_F.message + " 后:" + aj_18X05_Result_B.message; } else { aj_18X05_Result.code = "0"; aj_18X05_Result.message = "前:" + aj_18X05_Result_F.message + " 后:" + aj_18X05_Result_B.message; } } else {//其他项目 aj_18X05_Result = aj_18C58.Write_18X05(m_18X05_Para); } aj_18C58_Result.code = aj_18X05_Result.code; aj_18C58_Result.message = aj_18X05_Result.message; } #endif return(aj_18C58_Result); }
public string writeObjectOut(string xtlb, string jkxlh, string jkid, string xmlDoc) { AJ_WriteProcess writeProcess = new AJ_WriteProcess(); AJ_XMLToModel xmlToModel = new AJ_XMLToModel(); AJ_ModelToXML modelToXML = new AJ_ModelToXML(); switch (jkid) { case "18C51": Vehicle_18C51_Para para_18C51 = new Vehicle_18C51_Para(jkid, jkxlh, xtlb); para_18C51 = (Vehicle_18C51_Para)xmlToModel.Para_XmlToModel(para_18C51, xmlDoc); Vehicle_18C51_Result result_18C51 = writeProcess.AJ_Write_18C51(para_18C51); string strRet_18C51 = modelToXML.ModelToXml("18C51", result_18C51); return(strRet_18C51); case "18C66": Vehicle_18C66_Para para_18C66 = new Vehicle_18C66_Para(jkid, jkxlh, xtlb); para_18C66 = (Vehicle_18C66_Para)xmlToModel.Para_XmlToModel(para_18C66, xmlDoc); Vehicle_18C66_Result result_18C66 = writeProcess.AJ_Write_18C66(para_18C66); string strRet_18C66 = modelToXML.ModelToXml("18C66", result_18C66); return(strRet_18C66); case "18J11": Vehicle_18J11_Para para_18J11 = new Vehicle_18J11_Para(jkid, jkxlh, xtlb); para_18J11 = (Vehicle_18J11_Para)xmlToModel.Para_XmlToModel(para_18J11, xmlDoc); Vehicle_18J11_Result result_18J11 = writeProcess.AJ_Write_18J11(para_18J11); string strRet_18J11 = modelToXML.ModelToXml("18J11", result_18J11); return(strRet_18J11); case "18J12": Vehicle_18J12_Para para_18J12 = new Vehicle_18J12_Para(jkid, jkxlh, xtlb); para_18J12 = (Vehicle_18J12_Para)xmlToModel.Para_XmlToModel(para_18J12, xmlDoc); Vehicle_18J12_Result result_18J12 = writeProcess.AJ_Write_18J12(para_18J12); string strRet_18J12 = modelToXML.ModelToXml("18J12", result_18J12); return(strRet_18J12); case "18C82": Vehicle_18C82_Para para_18C82 = new Vehicle_18C82_Para(jkid, jkxlh, xtlb); para_18C82 = (Vehicle_18C82_Para)xmlToModel.Para_XmlToModel(para_18C82, xmlDoc); Vehicle_18C82_Result result_18C82 = writeProcess.AJ_Write_18C82(para_18C82); string strRet_18C82 = modelToXML.ModelToXml("18C82", result_18C82); return(strRet_18C82); case "18C59": Vehicle_18C59_Para para_18C59 = new Vehicle_18C59_Para(jkid, jkxlh, xtlb); para_18C59 = (Vehicle_18C59_Para)xmlToModel.Para_XmlToModel(para_18C59, xmlDoc); Vehicle_18C59_Result result_18C59 = writeProcess.AJ_Write_18C59(para_18C59); string strRet_18C59 = modelToXML.ModelToXml("18C59", result_18C59); return(strRet_18C59); case "18C55": Vehicle_18C55_Para para_18C55 = new Vehicle_18C55_Para(jkid, jkxlh, xtlb); para_18C55 = (Vehicle_18C55_Para)xmlToModel.Para_XmlToModel(para_18C55, xmlDoc); Vehicle_18C55_Result result_18C55 = writeProcess.AJ_Write_18C55(para_18C55); string strRet_18C55 = modelToXML.ModelToXml("18C55", result_18C55); return(strRet_18C55); case "18C58": Vehicle_18C58_Para para_18C58 = new Vehicle_18C58_Para(jkid, jkxlh, xtlb); para_18C58 = (Vehicle_18C58_Para)xmlToModel.Para_XmlToModel(para_18C58, xmlDoc); Vehicle_18C58_Result result_18C58 = writeProcess.AJ_Write_18C58(para_18C58); string strRet_18C58 = modelToXML.ModelToXml("18C58", result_18C58); return(strRet_18C58); case "18C80": Vehicle_18C80_Para para_18C80 = new Vehicle_18C80_Para(); para_18C80.jkid = jkid; para_18C80.xtlb = xtlb; para_18C80.jkxlh = jkxlh; para_18C80 = (Vehicle_18C80_Para)xmlToModel.Para_XmlToModel(para_18C80, xmlDoc); Vehicle_18C80_Result result_18C80 = writeProcess.AJ_Write_18C80(para_18C80); string strRet_18C80 = modelToXML.ModelToXml("18C80", result_18C80); return(strRet_18C80); case "18C81": Vehicle_18C81_Para para_18C81 = new Vehicle_18C81_Para(); para_18C81.jkid = jkid; para_18C81.xtlb = xtlb; para_18C81.jkxlh = jkxlh; para_18C81 = (Vehicle_18C81_Para)xmlToModel.Para_XmlToModel(para_18C81, xmlDoc); Vehicle_18C81_Result result_18C81 = writeProcess.AJ_Write_18C81(para_18C81); string strRet_18C81 = modelToXML.ModelToXml("18C81", result_18C81); return(strRet_18C81); case "18J31": Vehicle_18J31_Para para_18J31 = new Vehicle_18J31_Para(jkid, jkxlh, xtlb); para_18J31 = (Vehicle_18J31_Para)xmlToModel.Para_XmlToModel(para_18J31, xmlDoc); Vehicle_18J31_Result result_18J31 = writeProcess.AJ_Write_18J31(para_18J31); string strRet_18J31 = modelToXML.ModelToXml("18J31", result_18J31); return(strRet_18J31); case "18C62": Vehicle_18C62_Para para_18C62 = new Vehicle_18C62_Para(jkid, jkxlh, xtlb); para_18C62 = (Vehicle_18C62_Para)xmlToModel.Para_XmlToModel(para_18C62, xmlDoc); Vehicle_18C62_Result result_18C62 = writeProcess.AJ_Write_18C62(para_18C62); string strRet_18C62 = modelToXML.ModelToXml("18C62", result_18C62); return(strRet_18C62); case "18C65": Vehicle_18C65_Para para_18C65 = new Vehicle_18C65_Para(jkid, jkxlh, xtlb); para_18C65 = (Vehicle_18C65_Para)xmlToModel.Para_XmlToModel(para_18C65, xmlDoc); Vehicle_18C65_Result result_18C65 = writeProcess.AJ_Write_18C65(para_18C65); string strRet_18C65 = modelToXML.ModelToXml("18C65", result_18C65); return(strRet_18C65); case "18C52": Vehicle_18C52_Para para_18C52 = new Vehicle_18C52_Para(jkid, jkxlh, xtlb); para_18C52 = (Vehicle_18C52_Para)xmlToModel.Para_XmlToModel(para_18C52, xmlDoc); Vehicle_18C52_Result result_18C52 = writeProcess.AJ_Write_18C52(para_18C52); string strRet_18C52 = modelToXML.ModelToXml("18C52", result_18C52); return(strRet_18C52); case "18C72": Vehicle_18C72_Para para_18C72 = new Vehicle_18C72_Para(jkid, jkxlh, xtlb); para_18C72 = (Vehicle_18C72_Para)xmlToModel.Para_XmlToModel(para_18C72, xmlDoc); Vehicle_18C72_Result result_18C72 = writeProcess.AJ_Write_18C72(para_18C72); string strRet_18C72 = modelToXML.ModelToXml("18C72", result_18C72); return(strRet_18C72); case "18C54": Vehicle_18C54_Para para_18C54 = new Vehicle_18C54_Para(jkid, jkxlh, xtlb); para_18C54 = (Vehicle_18C54_Para)xmlToModel.Para_XmlToModel(para_18C54, xmlDoc); Vehicle_18C54_Result result_18C54 = writeProcess.AJ_Write_18C54(para_18C54); string strRet_18C54 = modelToXML.ModelToXml("18C54", result_18C54); return(strRet_18C54); case "18C63": Vehicle_18C63_Para para_18C63 = new Vehicle_18C63_Para(jkid, jkxlh, xtlb); para_18C63 = (Vehicle_18C63_Para)xmlToModel.Para_XmlToModel(para_18C63, xmlDoc); Vehicle_18C63_Result result_18C63 = writeProcess.AJ_Write_18C63(para_18C63); string strRet_18C63 = modelToXML.ModelToXml("18C63", result_18C63); return(strRet_18C63); case "18X05": Vehicle_18X05_Para para_18X05 = new Vehicle_18X05_Para(jkid, jkxlh, xtlb); para_18X05 = (Vehicle_18X05_Para)xmlToModel.Para_XmlToModel(para_18X05, xmlDoc); Vehicle_18X05_Result result_18X05 = writeProcess.AJ_Write_18X05(para_18X05); string strRet_18X05 = modelToXML.ModelToXml("18X05", result_18X05); return(strRet_18X05); case "18W05": Vehicle_18W05_Para para_18W05 = new Vehicle_18W05_Para(); para_18W05 = (Vehicle_18W05_Para)xmlToModel.Para_XmlToModel(para_18W05, xmlDoc); Vehicle_18W05_Result result_18W05 = writeProcess.AJ_Write_18W05(para_18W05); string strRet_18W05 = modelToXML.ModelToXml("18W05", result_18W05); return(strRet_18W05); default: break; } return(""); }