public static void PMSaveLocation(string selectedIds, long SkuId) { iProductMasterClient productVen = new iProductMasterClient(); CustomProfile profile = CustomProfile.GetProfile(); mProductVendor prodvend = new mProductVendor(); string ids = selectedIds.ToString(); string[] words = ids.Split(','); for (int i = 1; i < words.Length; i++) { long vendorID = long.Parse(words[i]); prodvend.SKUID = SkuId; prodvend.VendorID = long.Parse(words[i]); long count = productVen.GetProdVendCount(SkuId, vendorID, profile.DBConnection._constr); if (count <= 0) { productVen.InsertProductVendor(prodvend, profile.DBConnection._constr); } } }