Пример #1
0
 private void loadData(dhEmployee objEmployee, Boolean ShowResultCount = false)
 {
     dsGeneral.dtEmployeeDataTable dtEmployee = iFacede.GetEmployee(Globalized.ObjDbName, objEmployee);
     sequence = ReflectionUtility.DataTableToObservableCollection <dhEmployee>(dtEmployee);
     EmployeeList.ItemsSource = sequence;
     // pageControl.PageContract = null;
     //pageControl.PageContract = this;
     Globalized.ShowMsg(lblErrorMsg);
     // show msg for local search
     if ((ShowResultCount) && (sequence != null))
     {
         String msg = String.Format("  {0}  Search Results Found", sequence.Count);
         //pageControl.ReLoad();
         Globalized.setException(msg, lblErrorMsg, DataHolders.MsgType.Info);
     }
 }
Пример #2
0
        private void Stock_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (sender != null)
            {
                DataGridRow dgr = sender as DataGridRow;
                // get the obect and then Invoice ID opne the Id in readonly mode

                dhEmployee objTodisplay = new dhEmployee();

                objTodisplay.IEmpid = ((dhEmployee)dgr.Item).IEmpid;
                dsGeneral.dtEmployeeDataTable     dtEmployee = iFacede.GetEmployee(Globalized.ObjDbName, objTodisplay);
                ObservableCollection <dhEmployee> listItem   = ReflectionUtility.DataTableToObservableCollection <dhEmployee>(dtEmployee);
                if (listItem.Count > 0)
                {
                    objTodisplay         = listItem.Cast <dhEmployee>().Where(i => i.IEmpid.Equals(objTodisplay.IEmpid)).SingleOrDefault();
                    objTodisplay.IUpdate = 1;
                    AddTabItem(objTodisplay);
                }
            }
        }