Exemple #1
0
        protected void BindAddressList(long DeptID)
        {
            List <VW_GetUserLocation> LocLst         = new List <VW_GetUserLocation>();
            List <tAddress>           AdrsLst        = new List <tAddress>();
            iUCCommonFilterClient     UCCommonFilter = new iUCCommonFilterClient();
            CustomProfile             profile        = CustomProfile.GetProfile();

            //string AdrsType = UCCommonFilter.GetAdrsType(DeptID, profile.DBConnection._constr);
            //if (AdrsType == "Location")
            //{
            //    tblAddAdrs.Attributes.Add("style", "display:none");
            //    gvContactPerson.Columns[0].Visible = false;
            LocLst = UCCommonFilter.GetLocationOfUser(profile.Personal.UserID, profile.DBConnection._constr).ToList();
            //AdrsLst = UCCommonFilter.GetUserLocation(profile.Personal.UserID, profile.DBConnection._constr).ToList();
            //}
            //else
            //{
            tblAddAdrs.Attributes.Add("style", "display:''");
            long CompanyID = UCCommonFilter.GetCompanyIDFromSiteID(DeptID, profile.DBConnection._constr);

            // AdrsLst = UCCommonFilter.GetDeptAddressList(CompanyID, profile.DBConnection._constr).ToList();
            // AdrsLst = UCCommonFilter.GetDeptAddressListAdrsType(CompanyID, DeptID, profile.DBConnection._constr).ToList();
            //}
            gvContactPerson.DataSource = LocLst;
            gvContactPerson.DataBind();
        }