예제 #1
0
 /// <summary>
 /// Code to Add or Edit Supplier address details from Supplier master to database
 /// </summary>
 /// <param name="ObjEsupplier"></param>
 /// <returns></returns>
 public ESupplier SaveSupplierAddressDetails(ESupplier ObjEsupplier)
 {
     try
     {
         XmlDocument Xdoc  = new XmlDocument();
         string      XPath = "/Nouns/SupplierAddress";
         Xdoc         = XMLBuilder.XmlConstruct(Xdoc, XPath, "SupplierID", Convert.ToString(ObjEsupplier.SupplierID));
         Xdoc         = XMLBuilder.XmlConstruct(Xdoc, XPath, "AddressID", Convert.ToString(ObjEsupplier.AddressID));
         Xdoc         = XMLBuilder.XmlConstruct(Xdoc, XPath, "ShortName", ObjEsupplier.AddressShortName);
         Xdoc         = XMLBuilder.XmlConstruct(Xdoc, XPath, "StreetNo", ObjEsupplier.StreetNo);
         Xdoc         = XMLBuilder.XmlConstruct(Xdoc, XPath, "PostalCode", ObjEsupplier.AddrPostalCode);
         Xdoc         = XMLBuilder.XmlConstruct(Xdoc, XPath, "City", ObjEsupplier.AddrCity);
         Xdoc         = XMLBuilder.XmlConstruct(Xdoc, XPath, "Country", ObjEsupplier.AddrCountry);
         Xdoc         = XMLBuilder.XmlConstruct(Xdoc, XPath, "DefaultAddress", Convert.ToString(ObjEsupplier.DefaultAddress));
         ObjEsupplier = ObjDSupplier.SaveSupplierAddressDetails(Xdoc, ObjEsupplier);
         return(ObjEsupplier);
     }
     catch (Exception ex)
     {
         throw;
     }
 }