Example #1
0
        public PersSalesReport(DataRow row)
        {
            LpuRRList lpuRRList = LpuRRList.GetUniqueInstance();
            int       idLpuRR;

            int.TryParse(row[0].ToString(), out idLpuRR);
            _lpuRR = lpuRRList.GetItem(idLpuRR) as LpuRR;

            UserList userList = UserList.GetUniqueInstance();
            int      idUser;

            int.TryParse(row[1].ToString(), out idUser);
            _user = userList.GetItem(idUser) as User;

            RegionRRList regionRRList = RegionRRList.GetUniqueInstance();
            int          idRegionRR;

            int.TryParse(row[2].ToString(), out idRegionRR);
            _regionRR = regionRRList.GetItem(idRegionRR) as RegionRR;

            int idSDiv;

            int.TryParse(row[3].ToString(), out idSDiv);
            _sdiv = (SDiv)idSDiv;

            int idRD;

            int.TryParse(row[4].ToString(), out idRD);
            _rd = userList.GetItem(idRD) as User;

            int.TryParse(row[5].ToString(), out _year);
            double.TryParse(row[6].ToString(), out _euro);
            double.TryParse(row[7].ToString(), out _rub);
        }
Example #2
0
        public UserLpuRR(DataRow row)
            : base(row)
        {
            int idUser;

            int.TryParse(row[1].ToString(), out idUser);
            UserList userList = UserList.GetUniqueInstance();

            _user = userList.GetItem(idUser) as User;

            int idLpuRR;

            int.TryParse(row[2].ToString(), out idLpuRR);
            LpuRRList lpuRRList = LpuRRList.GetUniqueInstance();

            _lpuRR = lpuRRList.GetItem(idLpuRR) as LpuRR;

            int idSdiv;

            int.TryParse(row[3].ToString(), out idSdiv);
            _sdiv = (SDiv)idSdiv;

            int.TryParse(row[4].ToString(), out _year1);
            int.TryParse(row[5].ToString(), out _year2);
        }
Example #3
0
        public static LpuRRList GetUniqueInstance()
        {
            if (_uniqueInstance == null)
                _uniqueInstance = new LpuRRList("LPU");

            return _uniqueInstance;
        }
Example #4
0
        public static LpuRRList GetUniqueInstance()
        {
            if (_uniqueInstance == null)
            {
                _uniqueInstance = new LpuRRList("LPU");
            }

            return(_uniqueInstance);
        }
        public FormSecondStepAddOrganization(LPU lpu)
        {
            InitializeComponent();

            _realRegionList = RealRegionList.GetUniqueInstance();
            _lpuCompetitorsList = LpuCompetitorsList.GetUniqueInstance();
            _lpuRRList = LpuRRList.GetUniqueInstance();

            _lpu = lpu;

            _seacher = new SearchInDgv(dgvLPUCompetitors);
        }
Example #6
0
        public void Save()
        {
            if (ID == 0)
            {
                int id;
                int.TryParse(_provider.Insert("LPU", Name, FullName, _regionRR.ID, StatusLPU), out id);

                ID = id;
            }
            else
            {
                _provider.Update("LPU", ID, Name, FullName, StatusLPU);
            }

            LpuRRList lpuRRList = LpuRRList.GetUniqueInstance();

            lpuRRList.Add(this);
        }
        public HT_Add_LPU(bool flag_edit = true)
        {
            InitializeComponent();

            _regionRRList = RegionRRList.GetUniqueInstance();
            _lpuRRList = LpuRRList.GetUniqueInstance();
            _lpuHTList = LpuRRList.GetUniqueInstance();

            _lpuRRController = new LpuRRController(_dgv1);
            _lpuHTController = new LpuRRController(_dgv2);

            btnAddUserLPU.Visible = flag_edit;
            btnDelUserLPU.Visible = flag_edit;

            globalData.update = false;
            fillRegion();
            globalData.update = true;
            loadData1();
            loadData2();
        }
        public FormAddLPU(LPU lpu)
        {
            InitializeComponent();
            
            _lpu = lpu;

            if (_lpu.ParentOrganization != null)
                _parentLPU = (_lpu.ParentOrganization as LPU);

            _isLoad = false;

            _typeLPUList = TypeLPUList.GetUniqueInstance();
            _ownershipList = OwnershipList.GetUniqueInstance();
            _admLevelList = AdmLevelList.GetUniqueInstance();
            _mainSpecList = MainSpecList.GetUniqueInstance();
            _realRegionList = RealRegionList.GetUniqueInstance();
            _typeFinList = TypeFinList.GetUniqueInstance();
            _historyList = HistoryList.GetUniqueInstance();
            _lpuRRList = LpuRRList.GetUniqueInstance();
        }
        public UserLpuAccess()
        {
            InitializeComponent();

            _regionRRList = RegionRRList.GetUniqueInstance();
            _lpuRRList = LpuRRList.GetUniqueInstance();
            _userLpuRRList = UserLpuRRList.GetUniqueInstance();
            _userList = UserList.GetUniqueInstance();

            _lpuRRController = new LpuRRController(_dgv1);
            _userLpuRRListController = new UserLpuRRListController(_dgv2);

            globalData.load = false;

            cbSDiv.SelectedIndex = 0;

            globalData.Div = cbSDiv.SelectedItem.ToString();

            globalData.load = true;

            fillRegion();
            fillUsers();
        }
 public LpuRRController(DataGridView dgv)
     : base(dgv)
 {
     _lpuRRList = LpuRRList.GetUniqueInstance();
 }