public void LoadExistingAreasForProduct(string productid, int active) { CommonResource.Area s; ExistingAreas.Clear(); ExcludedAreas.Clear(); client = new SQSAdminServiceClient(); client.Endpoint.Address = new System.ServiceModel.EndpointAddress(CommonVariables.WcfEndpoint); DataSet ds = client.SQSAdmin_RelatedArea_LoadExistingAreasForProduct(productid, active); client.Close(); foreach (DataRow dr in ds.Tables[0].Rows) { s = new CommonResource.Area(); if (dr["validateinstudiom"] != null && (dr["validateinstudiom"].ToString() == "1" || dr["validateinstudiom"].ToString().ToUpper() == "TRUE")) { s.AreaID = int.Parse(dr["areaid"].ToString()); s.AreaName = dr["areaname"].ToString(); ExistingAreas.Add(s); } else { s.AreaID = int.Parse(dr["areaid"].ToString()); s.AreaName = dr["areaname"].ToString(); ExcludedAreas.Add(s); } } }
public void LoadConfiguredAreasForHome(int homeid) { ConfiguredAreas.Clear(); client = new SQSAdminServiceClient(); client.Endpoint.Address = new System.ServiceModel.EndpointAddress(CommonVariables.WcfEndpoint); DataSet ds = client.SQSAdmin_Generic_GetConfiguredAreasByHome(homeid); client.Close(); foreach (DataRow dr in ds.Tables[0].Rows) { CommonResource.Area b = new CommonResource.Area(); b.AreaID = int.Parse(dr["areaid"].ToString()); b.AreaName = dr["areaname"].ToString(); ConfiguredAreas.Add(b); } }
public void LoadAvailableAreasForProduct(string productid, string keyword, string callfrom) { CommonResource.Area s; AvailableAreas.Clear(); client = new SQSAdminServiceClient(); client.Endpoint.Address = new System.ServiceModel.EndpointAddress(CommonVariables.WcfEndpoint); DataSet ds = client.SQSAdmin_RelatedArea_LoadAvailableAreasForProduct(productid, keyword, callfrom); client.Close(); foreach (DataRow dr in ds.Tables[0].Rows) { s = new CommonResource.Area(); s.AreaID = int.Parse(dr["areaid"].ToString()); s.AreaName = dr["areaname"].ToString(); AvailableAreas.Add(s); } }