//public void LoadPAGsFromProduct(string productid)
        //{
        //    client = new SQSAdminServiceClient();
        //    client.Endpoint.Address = new System.ServiceModel.EndpointAddress(CommonVariables.WcfEndpoint);
        //    DataSet ds= client.SQSAdmin_StandardInclusion_GetPAGFromProduct(productid);
        //    client.Close();

        //    SQSProductAreaGroup.Clear();
        //    ProductAreaGroup pg = new ProductAreaGroup();
        //    pg.ProductAreaGroupID = 0;
        //    pg.ProductAreaGroupName = "Please Select...";
        //    SQSProductAreaGroup.Add(pg);

        //    foreach (DataRow dr in ds.Tables[0].Rows)
        //    {
        //        pg = new ProductAreaGroup();
        //        pg.ProductAreaGroupID = int.Parse(dr["productareagroupid"].ToString());
        //        pg.ProductAreaGroupName = dr["productareagroupid"].ToString();
        //        SQSProductAreaGroup.Add(pg);
        //    }

        //}
        public void LoadAvailableStandardInclusionPAGsFromMasterList(string productid, string productname, int areaid, int groupid, int stateid)
        {
            DateTime dateSelected = (DateTime)System.Data.SqlTypes.SqlDateTime.MinValue;

            client = new SQSAdminServiceClient();
            client.Endpoint.Address = new System.ServiceModel.EndpointAddress(CommonVariables.WcfEndpoint);
            DataSet ds = client.SQSAdmin_StandardInclusion_GetAvailableStandardInclusionPAGFromMasterList(areaid, groupid, productid, productname, stateid);

            client.Close();

            SQSProductAreaGroup.Clear();
            ProductAreaGroup pg;

            if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                foreach (DataRow dr in ds.Tables[0].Rows)
                {
                    pg = new ProductAreaGroup();
                    pg.ProductAreaGroupID = int.Parse(dr["productareagroupid"].ToString());
                    pg.AreaID             = int.Parse(dr["areaid"].ToString());
                    pg.GroupID            = int.Parse(dr["groupid"].ToString());
                    pg.AreaName           = dr["areaname"].ToString();
                    pg.GroupName          = dr["groupname"].ToString();
                    pg.ProductID          = dr["productid"].ToString();
                    pg.ProductName        = dr["productname"].ToString();
                    pg.ProductDescription = dr["productdescription"].ToString();
                    pg.ProductIDName      = dr["productid"].ToString() + " - " + dr["productname"].ToString();
                    SQSProductAreaGroup.Add(pg);
                }
            }
        }