private void btnnew_Click(object sender, EventArgs e) { bmb.AddNew(); btnnew.Enabled = false; btnadd.Enabled = true; int id = Convert.ToInt32(dt.Rows[dt.Rows.Count - 1][0]) + 1; txtid.Text = id.ToString(); txtdes.Focus(); }
private void btthemmoi_Click(object sender, EventArgs e) { tbxmnv.Text = ""; tbxdiachi.Text = ""; tbxluong.Text = ""; tbxtenhanvien.Text = ""; cbxchucvu.SelectedIndex = -1; dateTimePickerngaysinh.Text = DateTime.Now.ToString(); nhanvien.AddNew(); dem++; labtong.Text = dem.ToString(); try { ModuleDB.cnn.Open(); SqlCommand cmm = new SqlCommand("Select dbo.fu_CreateMaNV()", ModuleDB.cnn); tbxmnv.Text = cmm.ExecuteScalar().ToString(); } catch (Exception ex) { throw ex; } ModuleDB.cnn.Close(); }
private void btnNewDB_Click(object sender, EventArgs e) { bindPDB.AddNew(); dtNgayDat.Value = DateTime.Now; try { //goi function fn_CreateMaPDB de phát sinh so phieu dat bao //thay doifdfd SqlCommand cmm = new SqlCommand(); cmm.CommandType = CommandType.StoredProcedure; cmm.CommandText = "dbo.pro_CreateMaPDB"; cmm.Parameters.Add("@MaPHNew", SqlDbType.NVarChar, 5).Direction = ParameterDirection.Output; Modules.cnn.Open(); cmm.ExecuteScalar(); txtSoPhieu.Text = cmm.Parameters["@MaPHNew"].Value.ToString(); capNhat = true; ennableButton(); } catch (SqlException ex) { MessageBox.Show(ex.ToString()); } Modules.cnn.Close(); }
private void btnNouveau_Click(object sender, EventArgs e) { btnAjouter.Visible = true; btnNouveau.Visible = false; bmb.AddNew(); txtNom.Focus(); }
private void btnCreate_Click(object sender, EventArgs e) { listAdminAccount.AddNew(); // Interface NormalInterface = false; }
private void btnThem_Click(object sender, EventArgs e) { An_hien_nut_lenh(true); DS_BANDOC.AddNew(); // phát sinh mã thẻ SqlConnection cnn = new SqlConnection(XL_BANG.Chuoi_lien_ket); cnn.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = cnn; cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.CommandText = "Phat_sinh_ma_the"; cmd.Parameters.Add("MaThe", System.Data.SqlDbType.VarChar, 6); cmd.Parameters["MaThe"].Direction = System.Data.ParameterDirection.ReturnValue; DataRowView dr = (DataRowView)DS_BANDOC.Current; dr["MaThe"] = cmd.Parameters["MaThe"].Value.ToString(); txtMaThe.Text = cmd.Parameters["MaThe"].Value.ToString(); cnn.Close(); cap_nhat = true; }
private void Add_Click(object sender, EventArgs e) { bmb.AddNew(); category_name.Text = ""; save.Enabled = true; Add.Enabled = false; }
private void btn_new_Click(object sender, EventArgs e) { BM.AddNew(); textBox_ID.Text = BM.Count.ToString(); textBox_phone.ReadOnly = false; textBox_name.ReadOnly = false; }
private void button5_Click(object sender, EventArgs e) { bmb.AddNew(); newbtn.Enabled = false; addbtn.Enabled = true; numbtxt.Focus(); }
private void tolSpInsert_Click(object sender, EventArgs e) { DSHD.AddNew(); DSCTHD.AddNew(); capNhat = true; enableButton(); }
private void btnTHEMNV_Click(object sender, EventArgs e) { DSNV.AddNew(); txtMANV.Text = PHATSINHMANV.Instance.MANHANVIEN().ToString(); capnhat = true; enablebutton(); }
private void btnCreate_Click(object sender, EventArgs e) { listProductCategory.AddNew(); // Interface NormalInterface = false; }
private void btMuonSach_Click(object sender, EventArgs e) { An_hien_nut_lenh(true); DS_MUON_SACH.AddNew(); DataRowView dr = (DataRowView)DS_MUON_SACH.Current; dr["MaThe"] = cbMaThe.SelectedValue; }
private void btnThem_Click(object sender, EventArgs e) { SACH.AddNew(); maskedMaSach.Focus(); capnhat = true; insert = true; enaButton(); }
private void Add_Click(object sender, EventArgs e) { bm.AddNew(); btnNew.Enabled = false; add.Enabled = true; textBox_CatID.Text = (bm.Count).ToString(); textBox_CatName.Focus(); }
private void btn_New_Click(object sender, EventArgs e) { BMB.AddNew(); btn_New.Enabled = false; btn_Add.Enabled = true; txtb_Description.Focus(); txtb_IDCategory.Text = (DT.Rows.Count + 1).ToString(); lbl_Position.Text = (BMB.Position + 1) + " / " + BMB.Count; }
private void buttonClear_Click(object sender, EventArgs e) { bm.AddNew(); buttonAdd.Enabled = true; buttonClear.Enabled = false; int id = Convert.ToInt32(dt.Rows[dt.Rows.Count - 1][0]) + 1; textid.Text = id.ToString(); textname.Focus(); }
private void btnAdd_Click(object sender, EventArgs e) { bmb.AddNew(); btnAdd.Enabled = false; btnSave.Enabled = true; txtboxID.ReadOnly = false; int id = Convert.ToInt32(dt.Rows[dt.Rows.Count - 1][0]) + 1; txtboxID.Text = id.ToString(); }
private void btnNew_Click(object sender, EventArgs e) { bmp.AddNew(); btnNew.Enabled = false; btnAdd.Enabled = true; txtDesc.Focus(); int id = Convert.ToInt32(Dt.Rows[Dt.Rows.Count - 1]["الرقم"]) + 1; txtID.Text = id.ToString(); }
private void add_new_Click(object sender, EventArgs e) { bmb.AddNew(); add.Enabled = true; name.Text = ""; surname.Text = ""; email.Text = ""; phone.Text = ""; image.Image = null; add_new.Enabled = false; }
private void btnNew_Click(object sender, EventArgs e) { // اضافة حقول فارغة وتجهيز قيمة جديدة للمعرف تكون أكبر بواحد من آخر قيمة له bmb.AddNew(); int id = Convert.ToInt32(dt.Rows[dt.Rows.Count - 1][0]) + 1; txtRef.Text = id.ToString(); txtDesc.Focus(); btnNew.Enabled = false; btnAdd.Enabled = true; }
private void btnNew_Click(object sender, EventArgs e) { bmb.AddNew(); btnAdd.Enabled = true; btnNew.Enabled = false; //this to add +1 in (new)text id int id = Convert.ToInt32(dt.Rows[dt.Rows.Count - 1][0]) + 1; txtID.Text = id.ToString(); txtDesc.Focus(); }
private void btnNewCate_Click(object sender, EventArgs e) { bmb.AddNew(); btnAddCate.Enabled = true; btnNewCate.Enabled = false; int id = Convert.ToInt32(dt.Rows[dt.Rows.Count - 1][0]) + 1; // int id = bmb.Count + 1; txtCateID.Text = id.ToString(); txtCateDesc.Focus(); txtCateDesc.ReadOnly = false; }
private void btnOK_Click(object sender, EventArgs e) { bmb.AddNew(); btnedit.Enabled = true; btnOK.Enabled = false; textBox1.Focus(); textBox2.Focus(); textBox3.Focus(); textBox4.Focus(); textBox6.Focus(); }
public virtual void PerformAction(ActionType action) { if (CurrencyManager == null && CurrencyManager.Count > 0) { return; } switch (action) { case ActionType.None: break; case ActionType.First: CurrencyManager.Position = 0; break; case ActionType.Prev: if (CurrencyManager.Position > 0) { CurrencyManager.Position--; } break; case ActionType.Next: if (CurrencyManager.Position < CurrencyManager.Count - 1) { CurrencyManager.Position++; } break; case ActionType.Last: CurrencyManager.Position = CurrencyManager.Count - 1; break; case ActionType.Add: CurrencyManager.AddNew(); break; case ActionType.Delete: CurrencyManager.RemoveAt(CurrencyManager.Position); break; case ActionType.EndEdit: CurrencyManager.EndCurrentEdit(); break; case ActionType.CancelEdit: CurrencyManager.CancelCurrentEdit(); break; default: throw new NotSupportedException(); } }
private void button2_Click(object sender, EventArgs e) { phanbiet = 1; tbxmasanpham1.Text = ""; tbxtensanpham1.Text = ""; numupdowsoluong.Value = 0; sanpham.AddNew(); SqlCommand cmm = new SqlCommand("SELECT dbo.fu_createMASP()", ModuleDB.cnn); ModuleDB.cnn.Open(); tbxmasanpham1.Text = cmm.ExecuteScalar().ToString(); ModuleDB.cnn.Close(); }
private void newCat_Click(object sender, EventArgs e) { bmb.AddNew(); newCat.Enabled = false; updateCat.Enabled = false; deleteCAt.Enabled = false; printOne.Enabled = false; printAll.Enabled = false; addCat.Enabled = true; int id = Convert.ToInt32(dt.Rows[dt.Rows.Count - 1][0]) + 1; id_cat.Text = id.ToString(); desk_cat.Focus(); }
private void btnNew_Click(object sender, EventArgs e) { bmb.AddNew(); btnNew.Enabled = false; btnAdd.Enabled = true; btnDelete.Enabled = false; btnEdit.Enabled = false; int id = Convert.ToInt32(dt.Rows[dt.Rows.Count][0]) + 1; textID.Text = id.ToString(); textDescription.Focus(); textDescription.Enabled = true; }
private void BtnNew_Click(object sender, EventArgs e) { int ind = dataGridView1.Rows.Count - 1; bmb.AddNew(); try { foreach (var c in groupBox1.Controls) { if (c is TextBox) { var text = (TextBox)c; text.Text = "-"; text.ForeColor = Color.DarkGray; text.TextAlign = HorizontalAlignment.Center; } } txtId.ForeColor = Color.Black; txtId.Text = (Convert.ToInt32(dataGridView1.Rows[ind].Cells[0].Value) + 1).ToString(); txtId.Text = data.GetData("getProviderId", null).Rows[0][0].ToString(); btn_add.Enabled = true; btnNew.Enabled = false; lblPos.Text = bmb.Position + 1 + "/" + bmb.Count; txtNomF.Text = "-"; txtNomF.ForeColor = Color.DarkGray; txtTele1.Text = "-"; txtTele1.ForeColor = Color.DarkGray; txtTele2.Text = "-"; txtTele2.ForeColor = Color.DarkGray; txtEmail.Text = "-"; txtEmail.ForeColor = Color.DarkGray; } catch { txtId.Text = data.GetData("getProviderId", null).Rows[0][0].ToString(); btn_add.Enabled = true; btnNew.Enabled = false; lblPos.Text = bmb.Position + 1 + "/" + bmb.Count; txtNomF.Text = "-"; txtNomF.ForeColor = Color.DarkGray; txtTele1.Text = "-"; txtTele1.ForeColor = Color.DarkGray; txtTele2.Text = "-"; txtTele2.ForeColor = Color.DarkGray; txtEmail.Text = "-"; txtEmail.ForeColor = Color.DarkGray; return; } }
private void btnNew_Click(object sender, EventArgs e) { try { BMB.AddNew(); btnNew.Enabled = false; btnAdd.Enabled = true; int ID = Convert.ToInt32(DT.Rows[DT.Rows.Count - 1][0]) + 1; txtID.Text = ID.ToString(); txtDes.Focus(); } catch { MessageBox.Show("حدث خطأ ما", "خطأ", MessageBoxButtons.OK, MessageBoxIcon.Error); } }