Пример #1
0
        public virtual object[] GetRow()
        {
            string typeOrgName = TypeOrg.ToString();

            return(new object[] { ID, CrmID, ShortName, typeOrgName, INN, (RealRegion == null) ? string.Empty : RealRegion.Name,
                                  (City == null) ? string.Empty : City, string.Empty, string.Empty, string.Empty });
        }
        private Organization GetOrganization(OrganizationModel model)
        {
            Organization organization = organizationList.GetItem(model.NumberSF);

            if (organization == null)
            {
                try
                {
                    TypeOrg typeOrg = GetTypeOrg(model);
                    organization = new Organization(typeOrg);
                }
                catch (NullReferenceException)
                {
                    if (model.RecordType == "RU_Other")
                    {
                        LogManager.WriteNotFound(model.ClientType, "Organization subtype", model.NumberSF);
                    }
                    else
                    {
                        LogManager.WriteNotFound(model.RecordType, "Organization type", model.NumberSF);
                    }
                }
            }

            return(organization);
        }
Пример #3
0
        public Organization(TypeOrg typeOrg)
        {
            _provider = Provider.GetProvider();

            TypeOrg   = typeOrg;
            NumberSF  = string.Empty;
            ShortName = string.Empty;
        }
Пример #4
0
        public static Organization CreateItem(TypeOrg typeOrg, Organization parentOrganization = null)
        {
            Organization organization = (typeOrg == TypeOrg.ЛПУ) ? new LPU(typeOrg) : new Organization(typeOrg);

            organization.ParentOrganization = parentOrganization;

            return(organization);
        }
Пример #5
0
        public Organization(TypeOrg typeOrg)
        {
            _provider = Provider.GetProvider();

            TypeOrg = typeOrg;
            NumberSF = string.Empty;
            ShortName = string.Empty;
        }
        private Organization GetOrganization(TypeOrg typeOrg, bool haveParent)
        {
            Organization organization = new Organization(typeOrg);

            if (haveParent)
            {
                organization.ParentOrganization = OrganizationList.GetUniqueInstance().GetFirst();
            }

            return organization;
        }
Пример #7
0
        private Organization GetOrganization(TypeOrg typeOrg, bool haveParent)
        {
            Organization organization = new Organization(typeOrg);

            if (haveParent)
            {
                organization.ParentOrganization = OrganizationList.GetUniqueInstance().GetFirst();
            }

            return(organization);
        }
Пример #8
0
        public OrganizationListController(DataGridView dgv)
            : base(dgv)
        {
            _dgv = dgv;

            _userList = UserList.GetUniqueInstance();

            _lpuList = new LpuList();

            _user = _userList.GetItem(globalData.UserID) as User;

            _typeOrg = TypeOrg.ЛПУ;
        }
        public OrganizationListController(DataGridView dgv)
            : base(dgv)
        {
            _dgv = dgv;
                        
            _userList = UserList.GetUniqueInstance();

            _lpuList = new LpuList();

            _user = _userList.GetItem(globalData.UserID) as User;

            _typeOrg = TypeOrg.ЛПУ;
        }
Пример #10
0
        public static Task <Organization> CreateItemAsync(DataRow row)
        {
            TypeOrg typeOrg = (TypeOrg)Convert.ToInt32(row["TypeOrg_id"].ToString());

            Task <Organization> task = new Task <Organization>(() =>
            {
                return((typeOrg == TypeOrg.ЛПУ) ? new LPU(row) : new Organization(row));
            });

            task.Start();

            return(task);
        }
Пример #11
0
        public static Organization CreateItem(TypeOrg typeOrg, Organization parentOrganization = null)
        {
            Organization organization = (typeOrg == TypeOrg.ЛПУ) ? new LPU(typeOrg) : new Organization(typeOrg);

            organization.ParentOrganization = parentOrganization;

            return organization;
        }
Пример #12
0
        public string GetOrgType(TypeOrg typeOrg, bool haveParent)
        {
            Organization organization = GetOrganization(typeOrg, haveParent);

            return(_exportOrganization.GetRecordType(organization));
        }
Пример #13
0
        public static Organization CreateItem(DataRow row)
        {
            TypeOrg typeOrg = (TypeOrg)Convert.ToInt32(row["TypeOrg_id"].ToString());

            return((typeOrg == TypeOrg.ЛПУ) ? new LPU(row) : new Organization(row));
        }
        public string GetOrgType(TypeOrg typeOrg, bool haveParent)
        {
            Organization organization = GetOrganization(typeOrg, haveParent);

            return _exportOrganization.GetRecordType(organization);
        }
 public void SetTypeOrg(TypeOrg typeOrg)
 {
     _typeOrg = typeOrg;
 }
Пример #16
0
 public LPU(TypeOrg typeOrg)
     : base(typeOrg)
 {
 }
Пример #17
0
 public void SetTypeOrg(TypeOrg typeOrg)
 {
     _typeOrg = typeOrg;
 }
Пример #18
0
 public LPU(TypeOrg typeOrg)
     : base(typeOrg)
 {
 }
Пример #19
0
        public override object[] GetRow()
        {
            string typeOrgName = ((TypeOrg == TypeOrg.ЛПУ) && (ParentOrganization != null)) ? "Филиал ЛПУ" : TypeOrg.ToString();

            return(new object[] { ID, CrmID, ShortName, typeOrgName, (ParentOrganization == null) ? INN : (ParentOrganization as LPU).INN,
                                  (RealRegion == null) ? string.Empty : RealRegion.Name, City,
                                  (LpuRR == null) ? "Прочие ЛПУ" : LpuRR.Name, ((LpuRR2 == null) || (LpuRR2.ID == 0)) ? String.Empty : LpuRR2.Name,
                                  (LpuRR == null) ? "Российская федерация" : LpuRR.RegionRR.Name });
        }