private void frmVouchers_Load(object sender, EventArgs e) { if (DBLayer.User_Right(UserID, SecurityLevelID, "[Modify]")) { btnEdit.Enabled = true; } else { btnEdit.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Delete]")) { btnDelete.Enabled = true; } else { btnDelete.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Write]")) { btnAdd.Enabled = true; } else { btnAdd.Enabled = false; } tblVouchersTableAdapter.Fill(dataSet.tblVouchers); dgvVouchers.BringToFront(); tblVouchersBindingSource.Filter = "Voucher <> 'HBK' AND Voucher <> 'RWL' AND Voucher <> 'DON' AND Voucher <> 'ADV' AND Voucher <> 'NIC'"; }
private void frmParty_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'dataset2.tblHeaderType' table. You can move, or remove it, as needed. this.tblHeaderTypeTableAdapter.Fill(this.dataset2.tblHeaderType); // TODO: This line of code loads data into the 'dataSet.tblAccounts' table. You can move, or remove it, as needed. this.tblAccountsTableAdapter.Fill_All(this.dataSet.tblAccounts); if (DBLayer.User_Right(UserID, SecurityLevelID, "[Modify]")) { btnEdit.Enabled = true; } else { btnEdit.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Delete]")) { btnDelete.Enabled = true; } else { btnDelete.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Write]")) { btnAdd.Enabled = true; } else { btnAdd.Enabled = false; } dgvAccounts.BringToFront(); AcceptButton = btnAdd; }
private void frmNukh_Load(object sender, EventArgs e) { if (DBLayer.User_Right(UserID, SecurityLevelID, "[Modify]")) { btnEdit.Enabled = true; } else { btnEdit.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Delete]")) { btnDelete.Enabled = true; } else { btnDelete.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Write]")) { btnNew.Enabled = true; } else { btnNew.Enabled = false; } // TODO: This line of code loads data into the 'comDataSet.usp_SEL_tblNukh' table. You can move, or remove it, as needed. this.usp_SEL_tblNukhTableAdapter.Fill(this.comDataSet.usp_SEL_tblNukh); AcceptButton = btnNew; }
private void frmPermissions_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'comDataSet.tblUserGroup' table. You can move, or remove it, as needed. this.tblUserGroupTableAdapter.Fill_Permissions(this.comDataSet.tblUserGroup); if (DBLayer.User_Right(UserID, SecurityLevelID, "[Write]")) { btnNew.Enabled = true; } else { btnNew.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Delete]")) { btnDelete.Enabled = true; } else { btnDelete.Enabled = false; } // TODO: This line of code loads data into the 'comDataSet.tblSecurity' table. You can move, or remove it, as needed. this.tblSecurityTableAdapter.Fill(this.comDataSet.tblSecurity); // TODO: This line of code loads data into the 'comDataSet.usp_SEL_tblPermission' table. You can move, or remove it, as needed. this.usp_SEL_tblPermissionTableAdapter.Fill(this.comDataSet.usp_SEL_tblPermission); // TODO: This line of code loads data into the 'comDataSet.tblSecurityLevel' table. You can move, or remove it, as needed. this.tblSecurityLevelTableAdapter.Fill(this.comDataSet.tblSecurityLevel); // TODO: This line of code loads data into the 'comDataSet.usp_SEL_DDL_USER' table. You can move, or remove it, as needed. cmbUser.Text = null; }
private void frmHallBoking_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'comDataSet.tblAdvance' table. You can move, or remove it, as needed. this.tblAdvanceTableAdapter.Fill(this.comDataSet.tblAdvance); // TODO: This line of code loads data into the 'dataset3.tblAdvAcc' table. You can move, or remove it, as needed. this.tblAdvAccTableAdapter.Fill(this.dataset3.tblAdvAcc); // TODO: This line of code loads data into the 'dataset2.tblHallAcc' table. You can move, or remove it, as needed. // TODO: This line of code loads data into the 'dataset2.tblEvents' table. You can move, or remove it, as needed. this.tblEventsTableAdapter.Fill(this.dataset2.tblEvents); // TODO: This line of code loads data into the 'comDataSet.tblAccounts' table. You can move, or remove it, as needed. this.tblAccountsTableAdapter.Fill(this.comDataSet.tblAccounts); if (DBLayer.User_Right(UserID, SecurityLevelID, "[Modify]")) { btnEdit.Enabled = true; } else { btnEdit.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Delete]")) { btnDelete.Enabled = true; } else { btnDelete.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Write]")) { btnAdd.Enabled = true; } else { btnAdd.Enabled = false; } // TODO: This line of code loads data into the 'comDataSet.tblTransactions' table. You can move, or remove it, as needed. // TODO: This line of code loads data into the 'comDataSet.usp_SEL_tblOrakh' table. You can move, or remove it, as needed. this.usp_SEL_tblOrakhTableAdapter.Fill(this.comDataSet.usp_SEL_tblOrakh); dataGridView1.BringToFront(); }
private void frmDonations_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'comDataSet.usp_SEL_Donation' table. You can move, or remove it, as needed. this.usp_SEL_DonationTableAdapter.Fill(comDataSet.usp_SEL_Donation); // TODO: This line of code loads data into the 'dataset3.tblDonAcc' table. You can move, or remove it, as needed. this.tblDonAccTableAdapter.Fill(this.dataset3.tblDonAcc); // TODO: This line of code loads data into the 'comDataSet.tblTransactions' table. You can move, or remove it, as needed. this.tblTransactionsTableAdapter.Fill(this.comDataSet.tblTransactions); // TODO: This line of code loads data into the 'comDataSet.usp_SEL_Donation' table. You can move, or remove it, as needed. this.usp_SEL_DonationTableAdapter.Fill(this.comDataSet.usp_SEL_Donation); // TODO: This line of code loads data into the 'comDataSet.usp_SEL_FAMILY' table. You can move, or remove it, as needed. if (DBLayer.User_Right(UserID, SecurityLevelID, "[Modify]")) { btnEdit.Enabled = true; } else { btnEdit.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Delete]")) { btnDelete.Enabled = true; } else { btnDelete.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Write]")) { btnAdd.Enabled = true; } else { btnAdd.Enabled = false; } AcceptButton = btnAdd; dgvDonation.BringToFront(); txtChqZa.Text = string.Empty; }
private void frmHallBoking_Load(object sender, EventArgs e) { dgvFAid.BringToFront(); // TODO: This line of code loads data into the 'dataset2.tblAids' table. You can move, or remove it, as needed. this.tblAidsTableAdapter.Fill(this.dataset2.tblAids); // TODO: This line of code loads data into the 'comDataSet.tblHelp' table. You can move, or remove it, as needed. this.tblHelpTableAdapter.Fill(this.comDataSet.tblHelp); if (DBLayer.User_Right(UserID, SecurityLevelID, "[Modify]")) { btnEdit.Enabled = true; } else { btnEdit.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Delete]")) { btnDelete.Enabled = true; } else { btnDelete.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Write]")) { btnNew.Enabled = true; } else { btnNew.Enabled = false; } // TODO: This line of code loads data into the 'comDataSet.tblTransactions' table. You can move, or remove it, as needed. this.tblTransactionsTableAdapter.Fill(this.comDataSet.tblTransactions); btnReset_Click(sender, e); }
private void frmDeathRegistration_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'dataset3.usp_SEL_Death' table. You can move, or remove it, as needed. this.usp_SEL_DeathTableAdapter.Fill(this.comDataSet.usp_SEL_Death); // TODO: This line of code loads data into the 'comDataSet.usp_SEL_Death' table. You can move, or remove it, as needed. //this.usp_SEL_DeathTableAdapter.Fill(this.dataset3.usp_SEL_Death); txtDRCN.Visible = false; lblDRCN.Visible = false; if (DBLayer.User_Right(UserID, SecurityLevelID, "[Modify]")) { btnEdit.Enabled = true; } else { btnEdit.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Delete]")) { btnDelete.Enabled = true; } else { btnDelete.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Write]")) { btnNew.Enabled = true; } else { btnNew.Enabled = false; } AcceptButton = btnNew; dgvDeath.BringToFront(); }
//WorkStation------------------------------------------------------ //----------------------------------------------------------------- private void frmFamily_Load(object sender, EventArgs e) { DGFamily.BringToFront(); this.Top = 48; if (DBLayer.User_Right(UserID, SecurityLevelID, "[Modify]")) { btnEdit.Enabled = true; btnActive.Enabled = true; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Delete]")) { btnDelete.Enabled = true; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Write]")) { btnAdd.Enabled = true; } // TODO: This line of code loads data into the 'comDataSet.usp_SEL_tblWorkType' table. You can move, or remove it, as needed. this.usp_SEL_tblWorkTypeTableAdapter.Fill(this.comDataSet.usp_SEL_tblWorkType); // TODO: This line of code loads data into the 'comDataSet.usp_SEL_tblArea' table. You can move, or remove it, as needed. this.usp_SEL_tblAreaTableAdapter.Fill(this.comDataSet.usp_SEL_tblArea); // TODO: This line of code loads data into the 'comDataSet.usp_SEL_tblCity' table. You can move, or remove it, as needed. this.usp_SEL_tblCityTableAdapter.Fill(this.comDataSet.usp_SEL_tblCity); // TODO: This line of code loads data into the 'comDataSet.usp_SEL_tblOrakh' table. You can move, or remove it, as needed. this.usp_SEL_tblOrakhTableAdapter.Fill(this.comDataSet.usp_SEL_tblOrakh); // TODO: This line of code loads data into the 'comDataSet.usp_SEL_tblVillage' table. You can move, or remove it, as needed. this.usp_SEL_tblVillageTableAdapter.Fill(this.comDataSet.usp_SEL_tblVillage); // TODO: This line of code loads data into the 'comDataSet.usp_SEL_tblNukh' table. You can move, or remove it, as needed. this.usp_SEL_tblNukhTableAdapter.Fill(this.comDataSet.usp_SEL_tblNukh); // TODO: This line of code loads data into the 'comDataSet.usp_SEL_FAMILY' table. You can move, or remove it, as needed. this.usp_SEL_FAMILYTableAdapter.Fill(comDataSet.usp_SEL_FAMILY); btnAdd.Focus(); this.AcceptButton = btnAdd; dpIssueDate.Text = DateTime.Now.ToString(); }
private void frmVillage_Load(object sender, EventArgs e) { if (DBLayer.User_Right(UserID, SecurityLevelID, "[Modify]")) { btnEdit.Enabled = true; } else { btnEdit.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Delete]")) { btnDelete.Enabled = true; } else { btnDelete.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Write]")) { btnNew.Enabled = true; } else { btnNew.Enabled = false; } // TODO: This line of code loads data into the 'comDataSet.usp_SEL_tblVillage' table. You can move, or remove it, as needed. this.usp_SEL_tblVillageTableAdapter.Fill(this.comDataSet.usp_SEL_tblVillage); AcceptButton = btnNew; //It should skin Groupbox and panel manually for dotnet projects , because AppFace can not identify them automatically // AppFace.SkinWindowSet(DGVillage.Handle, AppFace.SKIN_CLASS_GROUPBOX); }
private void btnFCardNo_Click(object sender, EventArgs e) { txtFCardNo_Leave(sender, e); string x = txtFCardNo.Text; Community.DBLayer dblayer = new Community.DBLayer(); if (txtFCardNo.Text == "") { MessageBox.Show("Please Insert Family Card Number", "Family Card Required", MessageBoxButtons.OK, MessageBoxIcon.Stop); } else { if (Chk == 0) { bool result = dblayer.CheckFamily(txtFCardNo.Text); if (result) { usp_SEL_FAMILYTableAdapter.Leader(comDataSet.usp_SEL_FAMILY, txtFCardNo.Text); FillGrid(txtFCardNo.Text); //FillGrid(txtFCardNo.Text); btnView.Enabled = true; //User_Right(); if (DBLayer.User_Right(UserID, SecurityLevelID, "[Modify]")) { btnEdit.Enabled = true; } else { btnEdit.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Delete]")) { btnDelete.Enabled = true; } else { btnDelete.Enabled = false; } if (DBLayer.User_Right(UserID, SecurityLevelID, "[Write]")) { btnAdd.Enabled = true; } else { btnAdd.Enabled = false; } Chk = 0; if (DGFamily.RowCount == 0) { DGFamily.Enabled = false; btnEdit.Enabled = false; btnDelete.Enabled = false; btnView.Enabled = false; } else { DGFamily.Enabled = true; } if (txtFCardNo.Text == "") { txtFCardNo.Text = x; } this.AcceptButton = btnAdd; } else { MessageBox.Show("Family CardNo doesnot exist! Please enter a Valid CardNo.", "Invalid CardNo.", MessageBoxButtons.OK, MessageBoxIcon.Stop); btnDelete.Enabled = false; btnAdd.Enabled = false; btnEdit.Enabled = false; DGFamily.Enabled = false; btnView.Enabled = false; txtOrakh.Text = ""; txtFamilyLeader.Text = ""; } } } }