Example #1
0
 public Control_ViewCompany(ListControl_CompanyView compListControl, Entity_CompanyDetails compDetailsObj, Form_ViewCompanies viewCompany)
 {
     this.compListControl = compListControl;
     this.viewCompany     = viewCompany;
     this.compDetailObj   = compDetailsObj;
     InitializeComponent();
 }
Example #2
0
 private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     this.Opacity = 1;
     myProgressDialog.Dispose();
     if ((bool)e.Result)
     {
         listCompView = new ListControl_CompanyView(this, compDetailList);
         panel_main.Controls.Add(listCompView);
         fistLoad = false;
     }
     else
     {
         Dialog_MyMessageBox.Show(Constant.REQUEST_UNPROCESSED, 1, UiColors.MESSAGE_ERROR);
     }
 }
Example #3
0
        private void displayUpcomingCompanies()
        {
            var upcomingCompanies = new List <Entity_CompanyDetails>();

            foreach (var compObj in compDetailList)
            {
                if (compObj.DOR >= DateTime.Now.Date &&
                    (Common.loggedUser.staffId == compObj.staffId || Common.loggedUser.staffId == Common.adminId))
                {
                    upcomingCompanies.Add(compObj);
                }
            }
            listCompView = new ListControl_CompanyView(this, upcomingCompanies);
            panel_main.Controls.Clear();
            panel_main.Controls.Add(listCompView);
        }
Example #4
0
        private void viewSearchedCompany()
        {
            string searchKey = textBox_search.Text;

            if (!string.IsNullOrWhiteSpace(searchKey))
            {
                List <Entity_CompanyDetails> tempList = null;
                if (compMap.ContainsKey(searchKey))
                {
                    tempList = new List <Entity_CompanyDetails> {
                        compMap[searchKey]
                    }
                }
                ;

                listCompView = new ListControl_CompanyView(this, tempList);
                //          compManager.getCompanyBySearchKey(searchKey));
                panel_main.Controls.Clear();
                panel_main.Controls.Add(listCompView);
            }
        }