static public Customer ConvertCustomer(CustomerXmlModel model) { Customer newModel = new Customer(); newModel.Inn = model.Inn; newModel.Kpp = model.Kpp; newModel.Okpo = model.Okpo; newModel.FullName = model.FullName; newModel.ShortName = model.ShortName; newModel.RegNum = model.RegNum; return(newModel); }
private CustomerXmlModel GetCustomerV45(XElement xContract) { var xCustomer = xContract.Element(GetFullElementNameOos(CUSTOMER)); var regNum = GetNodeValue(xCustomer, REG_NUM); var fullName = GetNodeValue(xCustomer, FULL_NAME); var shortName = GetNodeValue(xCustomer, SHORT_NAME); var inn = GetNodeValue(xCustomer, INN); var kpp = GetNodeValue(xCustomer, KPP); var okpo = GetNodeValue(xCustomer, OKPO); var customer = new CustomerXmlModel { FullName = fullName, Inn = inn, Kpp = kpp, Okpo = okpo, ShortName = shortName, RegNum = regNum }; return(customer); }