public void GetLocation(long Companyid)
        {
            DataSet              ds;
            CustomProfile        profile       = CustomProfile.GetProfile();
            iProductMasterClient productClient = new iProductMasterClient();

            ds = productClient.GetLocation(Companyid, profile.DBConnection._constr);
            ddllocation.DataSource     = ds;
            ddllocation.DataTextField  = "AddressLine1";
            ddllocation.DataValueField = "ID";
            ddllocation.DataBind();
            ListItem lst = new ListItem {
                Text = "-Select-", Value = "0"
            };

            ddllocation.Items.Insert(0, lst);
        }
        public static List <contact> GetLocation(object objreq)
        {
            iProductMasterClient productClient = new iProductMasterClient();
            CustomProfile        profile       = CustomProfile.GetProfile();
            DataSet        ds      = new DataSet();
            DataTable      dt      = new DataTable();
            List <contact> LocList = new List <contact>();

            try
            {
                Dictionary <string, object> dictionary = new Dictionary <string, object>();
                dictionary = (Dictionary <string, object>)objreq;
                //ds = ReceivableClient.GetProdLocations(ProdCode.Trim());
                long ddlcompanyId = long.Parse(dictionary["ddlcompanyId"].ToString());
                ds = productClient.GetLocation(ddlcompanyId, profile.DBConnection._constr);

                dt = ds.Tables[0];
                contact Loc = new contact();
                Loc.Name = "Select Location";
                Loc.Id   = "0";
                LocList.Add(Loc);
                Loc = new contact();

                if (dt.Rows.Count > 0)
                {
                    for (int i = 0; i < dt.Rows.Count; i++)
                    {
                        Loc.Id   = dt.Rows[i]["ID"].ToString();
                        Loc.Name = dt.Rows[i]["AddressLine1"].ToString();
                        LocList.Add(Loc);
                        Loc = new contact();
                    }
                }
            }
            catch
            {
            }
            finally
            {
                productClient.Close();
            }
            return(LocList);
        }