Ejemplo n.º 1
0
        public void LoadEmployee(ComboBox cbo)
        {
            Employee  e  = new Employee();
            DataTable dt = new DataTable();

            dt = e.SELECT_ALL();
            if (dt != null)
            {
                foreach (DataRow r in dt.Rows)
                {
                    cbo.Items.Add(r["lname"] + ", " + r["fname"] + " " + r["mname"] + "-" + r["empid"]);
                }
            }
        }
Ejemplo n.º 2
0
 public void LoadAllEployees()
 {
     Employee emp= new Employee();
     DataTable dt = new DataTable();
     dt = emp.SELECT_ALL();
     if (dt != null) {
         int num=1;
         foreach(DataRow r in dt.Rows){
             ListViewItem li = new ListViewItem();
             li.Text = num.ToString();
             li.SubItems.Add(r["empid"].ToString());
             li.SubItems.Add(r["lname"].ToString() + ", " + r["fname"].ToString() + " " + r["mname"].ToString());
             li.SubItems.Add(r["position_"].ToString());//r["position"].ToString());
             li.SubItems.Add(r["contactno"].ToString());
             //li.SubItems.Add(r["gender"].ToString());
             li.SubItems.Add(r["address"].ToString());
             lv.Items.Add(li);
             num++;
         }
     }
 }
Ejemplo n.º 3
0
        public void LoadEmployee(ComboBox cbo)
        {
            Employee e = new Employee();
                DataTable dt = new DataTable();

                dt = e.SELECT_ALL();
                if (dt != null) {
                    foreach (DataRow r in dt.Rows) {
                        cbo.Items.Add(r["lname"] + ", " + r["fname"] + " " + r["mname"] + "-" + r["empid"]);
                    }
                }
        }