public IEnumerable <BaseOptionSet> GetGendersOptions(UserLanguage language)
 {
     using (var globalmgr = new GlobalCrmManager())
     {
         return(globalmgr.GetOptionSetLookup(CrmEntityName, "new_gender", language));
     }
 }
Beispiel #2
0
 public virtual IEnumerable <string> GetRequiredFields()
 {
     using (GlobalCrmManager crmGlobalMgr = new GlobalCrmManager())
     {
         return(crmGlobalMgr.GetRequiredFieldsNamesForEntity(CrmEntityName).ToList());
     }
 }
Beispiel #3
0
 public virtual IEnumerable <BaseOptionSet> GetEntityStatusOptions(UserLanguage lang)
 {
     using (var globalCrmManager = new GlobalCrmManager())
     {
         return(globalCrmManager.GetOptionSetLookup(CrmEntityName, "statuscode", lang));
     }
 }
 public List <string> GetEmptyRequiredFields(string entityId)
 {
     using (GlobalCrmManager crmGlobalMgr = new GlobalCrmManager())
     {
         var list = crmGlobalMgr.GetAllEmptyRequiredFieldsNamesForRecord(CrmEntityName, crmGuidColumnName, entityId).ToList();
         return(CrmToModelMapper <Contact> .GetCrmToModelMapper(list).ToList());
     }
 }
Beispiel #5
0
        //public virtual IEnumerable<BaseQuickLookup> GetAllForLookup(UserLanguage lang)
        //{
        //    using (var globalmgr = new GlobalCrmManager())
        //    {
        //        var displayField = (lang == UserLanguage.Arabic ? CrmDisplayFieldName_Arabic : CrmDisplayFieldName);
        //        return globalmgr.GetQuickLookup(CrmEntityName, CrmGuidFieldName, displayField);
        //    }
        //}

        public virtual IEnumerable <BaseQuickLookup> GetAllForLookup(UserLanguage lang, bool withOppositeDisplayLangIfNull = true, string filterWhereCondition = "")
        {
            using (var globalmgr = new GlobalCrmManager())
            {
                string displayField = string.Empty, oppositeDisplayField = string.Empty;
                switch (lang)
                {
                case UserLanguage.Arabic:
                    displayField         = CrmDisplayFieldName_Arabic;
                    oppositeDisplayField = (withOppositeDisplayLangIfNull ? CrmDisplayFieldName : null);
                    break;

                default:
                    displayField         = CrmDisplayFieldName;
                    oppositeDisplayField = (withOppositeDisplayLangIfNull ? CrmDisplayFieldName_Arabic : null);
                    break;
                }
                return(globalmgr.GetQuickLookup(CrmEntityName, CrmGuidFieldName, displayField, oppositeDisplayField, filterWhereCondition));
            }
        }
Beispiel #6
0
 public virtual Entity GetCrmEntity(string id, string[] columns)
 {
     using (var globalmgr = new GlobalCrmManager())
         return(globalmgr.GetCrmEntity(CrmEntityName, id, columns));
 }
Beispiel #7
0
 public GeneralManager()
     : base(null)
 {
     GlobalCrmManager = new GlobalCrmManager();
 }