示例#1
0
文件: Utils.cs 项目: rajib54/HITSW
 public static Guid GetAddressTypeId(String title)
 {
     if (title == null || title == "") return Guid.Empty;
     HITSWContext db = new HITSWContext();
     Lookup_AddrType address_type = db.Lookup_AddrType.Where(e => e.ActiveRec == true && e.Title.Equals(title)).First();
     db.Dispose();
     return address_type.Id;
 }
示例#2
0
文件: Utils.cs 项目: rajib54/HITSW
 public static String GetEthnicityFromId(Guid id)
 {
     HITSWContext db = new HITSWContext();
     var model = db.Lookup_Ethnicity.Find(id);
     db.Dispose();
     if (model == null) return "";
     return model.Title;
 }
示例#3
0
文件: Utils.cs 项目: rajib54/HITSW
 public static String GetVirtualAddressTypeFromId(Guid id)
 {
     HITSWContext db = new HITSWContext();
     var virtualaddress = db.Lookup_AddrType.Find(id);
     db.Dispose();
     if (virtualaddress == null) return "";
     return virtualaddress.Title;
 }
示例#4
0
文件: Utils.cs 项目: rajib54/HITSW
 public static String GetVeteranFromId(Guid id)
 {
     HITSWContext db = new HITSWContext();
     var model = db.Lookup_AddrBk.Find(id);
     db.Dispose();
     if (model == null) return "";
     return model.Title;
 }
示例#5
0
文件: Utils.cs 项目: rajib54/HITSW
 public static String GetSalutationFromId(Guid id)
 {
     HITSWContext db = new HITSWContext();
     var model = db.Lookup_GenderRelationship.Find(id);
     db.Dispose();
     if (model == null) return "";
     return model.Title;
 }
示例#6
0
文件: Utils.cs 项目: rajib54/HITSW
 public static String GetPhoneFaxTypeFromId(Guid id)
 {
     HITSWContext db = new HITSWContext();
     var phonefax = db.Lookup_PhoneFaxType.Find(id);
     db.Dispose();
     if (phonefax == null) return "";
     return phonefax.Title;
 }
示例#7
0
文件: Utils.cs 项目: rajib54/HITSW
 public static String GetOrganizationTypeTitleFromId(Guid id)
 {
     HITSWContext db = new HITSWContext();
     var organizationType = db.Lookup_ContactType.Find(id);
     db.Dispose();
     if (organizationType == null) return "";
     return organizationType.Title;
 }
示例#8
0
文件: Utils.cs 项目: rajib54/HITSW
 public static String GetHighestEducationFromId(Guid id)
 {
     HITSWContext db = new HITSWContext();
     var model = db.Lookup_EducationalLevel.Find(id);
     db.Dispose();
     if (model == null) return "";
     return model.Title;
 }
示例#9
0
文件: Utils.cs 项目: rajib54/HITSW
 public static Guid GetOrganizationContactBasisId(Guid id)
 {
     HITSWContext db = new HITSWContext();
     AddrBk_OrganizationUnit addrbk_organization_unit = db.AddrBk_OrganizationUnit.Find(id);
     db.Dispose();
     return addrbk_organization_unit.ContactBasis_LCID;
 }
示例#10
0
文件: Utils.cs 项目: rajib54/HITSW
 public static String GetOrganiationFromId(Guid id)
 {
     if (id == null) return "";
     HITSWContext db = new HITSWContext();
     var model = db.AddrBk_OrganizationUnit.Find(id);
     db.Dispose();
     if (model == null) return "";
     return model.Name;
 }
示例#11
0
文件: Utils.cs 项目: rajib54/HITSW
 public static String GetMemberTypeFromId(Guid id)
 {
     HITSWContext db = new HITSWContext();
     var model = db.Lookup_ContactType.Find(id);
     db.Dispose();
     if (model == null) return "";
     return model.Title;
 }
示例#12
0
文件: Utils.cs 项目: rajib54/HITSW
 public static String GetMaritialStatusFromId(Guid id)
 {
     HITSWContext db = new HITSWContext();
     var model = db.Lookup_MaritalStatus.Find(id);
     db.Dispose();
     if (model == null) return "";
     return model.Title;
 }
示例#13
0
文件: Utils.cs 项目: rajib54/HITSW
 public static String GetLanguageFromId(Guid id)
 {
     HITSWContext db = new HITSWContext();
     var language = db.Lookup_Language.Find(id);
     db.Dispose();
     if (language == null) return "";
     return language.Title;
 }
示例#14
0
文件: Utils.cs 项目: rajib54/HITSW
 public static String GetInterestedProductServicesTitleFromId(Guid id)
 {
     HITSWContext db = new HITSWContext();
     var model = db.Lookup_AddrBk.Find(id);
     db.Dispose();
     if (model == null) return "";
     return model.Title;
 }
示例#15
0
文件: Utils.cs 项目: rajib54/HITSW
 public static String GetIndustrySectorFromId(Guid id)
 {
     HITSWContext db = new HITSWContext();
     var industry = db.Lookup_IndustrySector.Find(id);
     db.Dispose();
     if (industry == null) return "";
     return industry.Title;
 }
示例#16
0
文件: Utils.cs 项目: rajib54/HITSW
        public static Guid GetOrganizationLookUpBasisId(bool isExternalOrganization = true)
        {
            HITSWContext db = new HITSWContext();
            Lookup_ContactBasis basis = new Lookup_ContactBasis();

            if (isExternalOrganization)
                basis = db.Lookup_ContactBasis.Where(e => e.Title == "External Organization").First();
            else
                basis = db.Lookup_ContactBasis.Where(e => e.Title == "Internal Organization").First();

            db.Dispose();
            return basis.Id;
        }
示例#17
0
文件: Utils.cs 项目: rajib54/HITSW
 public static Guid GetGeoBasisId(Guid id)
 {
     if (id == null) return Guid.Empty;
     HITSWContext db = new HITSWContext();
     AddrBk_GeographicalGroup addrbk_geographicalgroup = db.AddrBk_GeographicalGroup.Find(id);
     db.Dispose();
     return addrbk_geographicalgroup.GeoBasis_LCID;
 }
示例#18
0
文件: Utils.cs 项目: rajib54/HITSW
 public static String GetGeoBasisTitle(Guid id)
 {
     if (id == null) return "";
     HITSWContext db = new HITSWContext();
     AddrBk_GeographicalGroup addrbk_geographicalgroup = db.AddrBk_GeographicalGroup.Find(id);
     Lookup_GeographicalBasis model = db.Lookup_GeographicalBasis.Find(addrbk_geographicalgroup.GeoBasis_LCID);
     db.Dispose();
     return model.Title.Trim();
 }