Example #1
0
        private void builDepartmentCbo()
        {
            Department_Controller departmentcboGet = new Department_Controller();
            DataTable             dt = departmentcboGet.DepartmentSelectAll();

            cboDepartment.DataSource    = dt;
            cboDepartment.DisplayMember = "Department";
            cboDepartment.ValueMember   = "IDS";
        }
Example #2
0
        private void DepartmentListGet()
        {
            try
            {
                Department_Controller departmentGet = new Department_Controller();

                dgvDepartment.DataSource = departmentGet.DepartmentSelectAll();
                this.dgvDepartment.Columns[0].Visible = false;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Example #3
0
        private void DepartmentUpdates()
        {
            try
            {
                Department_Controller departmentNew = new Department_Controller();
                departmentNew.DepartmentUpdate(Convert.ToDouble(txtIDS.Text), Convert.ToString(txtDepartment.Text));

                MessageBox.Show("Update Successfull");
                //  MachineGet(IDS);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Example #4
0
        public void DepartmentGet(double ids)
        {
            try
            {
                Department_Controller departmentGet = new Department_Controller();

                foreach (DataRow row in departmentGet.DepartmentSelect(ids).Rows)
                {
                    txtIDS.Text        = row["IDS"].ToString();
                    txtDepartment.Text = row["Department"].ToString();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }
Example #5
0
        private void DepartmentInserts()
        {
            try
            {
                Department_Controller departmentNew = new Department_Controller();
                Double IDS = departmentNew.DepartmentInsert(Convert.ToDouble(txtIDS.Text),
                                                            Convert.ToString(txtDepartment.Text)
                                                            );

                MessageBox.Show("Save Successfull");
                DepartmentGet(IDS);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
        }