private void Repair_Load(object sender, EventArgs e) { DataGridViewCheckBoxColumn column = new DataGridViewCheckBoxColumn(); column.HeaderText = "Select"; column.Name = "Select"; column.Visible = true; dgvRepairDevice.Columns.Add(column); dgvRepairDevice.Columns["Select"].DisplayIndex = 0; DataGridViewCheckBoxColumn column2 = new DataGridViewCheckBoxColumn(); column2.HeaderText = "Select"; column2.Name = "Select"; column2.Visible = true; dgvAddingDevice.Columns.Add(column2); dgvAddingDevice.Columns["Select"].DisplayIndex = 0; //rdrYesUse.Checked = true; //dgvListDevice.Columns.Add("Ma_TS_Repair", "Vật tư cần sửa chữa"); LoadComboboxData load = new LoadComboboxData(); load.LoadDataType(cbType_Repair); //load.LoadDataType(cbType_Add); LoadTypeMaterial(); }
private void Revoke_Load(object sender, EventArgs e) { DataGridViewCheckBoxColumn column = new DataGridViewCheckBoxColumn(); column.HeaderText = "Select"; column.Name = "Select"; column.Visible = true; dataGridView1.Columns.Add(column); dataGridView1.Columns["Select"].DisplayIndex = 0; dataGridView2.AllowUserToAddRows = false; con.Open(); string strcbStatus = "SELECT * FROM Status"; OracleCommand cmdStatus = new OracleCommand(strcbStatus, con); OracleDataAdapter daStatus = new OracleDataAdapter(cmdStatus); DataTable dtStatus = new DataTable(); daStatus.Fill(dtStatus); cbStatus.DataSource = dtStatus; cbStatus.DisplayMember = "Ten_tinh_trang"; cbStatus.ValueMember = "Ma_tinh_trang"; cmdStatus.ExecuteNonQuery(); con.Close(); LoadComboboxData comboboxData = new LoadComboboxData(); comboboxData.LoadDataType(cbTypeLV2); }
private void LoadTypeDevice() { LoadComboboxData loadCombobox = new LoadComboboxData(); loadCombobox.LoadDataType1(cbType1); loadCombobox.LoadDataType(cbTypeLV2); loadCombobox.LoadDataType1(cbTypeLevel1); string strQuerryType = "SELECT a.Ma_loai, a.Ten_loai, b.Ten_loai " + "FROM Loai_TS_cap2 a " + " INNER JOIN Loai_TS_cap1 b ON a.Phan_loai = b.Ma_loai ORDER BY a.Ma_loai ASC"; OracleDataAdapter daQuerryType = new OracleDataAdapter(strQuerryType, con); DataTable table = new DataTable(); daQuerryType.Fill(table); dgvShow.DataSource = table; dgvShow.Columns[0].HeaderText = "Mã Số"; dgvShow.Columns[1].HeaderText = "Loại Thiết Bị"; dgvShow.Columns[2].HeaderText = "Phân Loại Tài Sản"; string strQuerryUnit = "select * from Unit"; OracleDataAdapter daQuerryUnit = new OracleDataAdapter(strQuerryUnit, con); DataTable dtUnit = new DataTable(); daQuerryUnit.Fill(dtUnit); dgvUnit.DataSource = dtUnit; dgvUnit.Columns[0].HeaderText = "Mã đơn vị"; dgvUnit.Columns[1].HeaderText = "Đơn vị tính"; string QuerryModel = "select a.model_code, a.model, b.ten_loai, b.ma_loai from model a inner join loai_ts_cap2 b on a.type_code = b.ma_loai order by to_number(a.model_code)"; OracleDataAdapter daModel = new OracleDataAdapter(QuerryModel, con); DataTable dtModel = new DataTable(); daModel.Fill(dtModel); dgvModel.DataSource = dtModel; dgvModel.Columns[1].HeaderText = "Model"; cbTypeLV2.Enabled = false; txtModelName.Enabled = false; btnAddModel.Enabled = false; if (Login.username == "an.do") { btnXoa.Enabled = true; } else if (Login.username != "an.do") { btnXoa.Visible = false; } }
private void Borrow_Load(object sender, EventArgs e) { LoadComboboxData loadCombobox1 = new LoadComboboxData(); loadCombobox1.LoadDataType(cbType); loadCombobox1.LoadDataStatus(cbStatus); DataGridViewCheckBoxColumn column = new DataGridViewCheckBoxColumn(); column.Name = "Select"; column.HeaderText = "Select"; dgvQuerry.Columns.Add(column); dgvQuerry.Columns["Select"].DisplayIndex = 0; dgvQuerry.AllowUserToAddRows = false; dgvSelected.AllowUserToAddRows = false; rdST.Checked = true; btnTransfer.Enabled = false; }