public List <City> AutoFillCity() { int autoId = 1; List <City> cityList; ISupplierDAL supplierDAL = new SupplierDAL(); List <string> strlist = supplierDAL.GetAutoFillData("city"); cityList = new List <City>(); if (strlist != null) { foreach (string name in strlist) { City lst = new City(); lst.CityID = autoId; lst.Name = name; cityList.Add(lst); autoId++; } } return(cityList); }
public List <PostalCode> AutoFillPostalCode() { int autoId = 1; List <PostalCode> postalcodeList; ISupplierDAL supplierDAL = new SupplierDAL(); List <string> strlist = supplierDAL.GetAutoFillData("postalcode"); postalcodeList = new List <PostalCode>(); if (strlist != null) { foreach (string name in strlist) { PostalCode lst = new PostalCode(); lst.PostalCodeID = autoId; lst.Name = name; postalcodeList.Add(lst); autoId++; } } return(postalcodeList); }
public List <State> AutoFillState() { int autoId = 1; List <State> stateList; ISupplierDAL supplierDAL = new SupplierDAL(); List <string> strlist = supplierDAL.GetAutoFillData("state"); stateList = new List <State>(); if (strlist != null) { foreach (string name in strlist) { State lst = new State(); lst.StateID = autoId; lst.Name = name; stateList.Add(lst); autoId++; } } return(stateList); }