private void LoadAllCCSDDSS() { lv_CCSDDSS.Items.Clear(); List <CCCSDDSS> oList; CCCSDDSSBO oCCSDDSSBO = new CCCSDDSSBO(); CResult oResult = new CResult(); oResult = oCCSDDSSBO.ReadAll(this.eTable); if (oResult.IsSuccess) { oList = (List <CCCSDDSS>)oResult.Data; Load_lv_CCSDDSS(oList); } }
private void btnUpdate_Click(object sender, EventArgs e) { CCCSDDSS oCCSDDSS = GetFormData(); CCCSDDSSBO oCCSDDSSBO = new CCCSDDSSBO(); CResult oResult = new CResult(); oResult = oCCSDDSSBO.Update(oCCSDDSS, this.eTable); if (oResult.IsSuccess) { MessageBox.Show("Updated successfully"); } else { MessageBox.Show(oResult.ErrMsg); } LoadAllCCSDDSS(); }
private void btnDelete_Click(object sender, EventArgs e) { if (DialogResult.OK == MessageBox.Show("Are you want to delete " + txtCode.Text + " ?", "Confirmation!", MessageBoxButtons.OKCancel)) { CCCSDDSS oCCSDDSS = GetFormData(); CCCSDDSSBO oCCSDDSSBO = new CCCSDDSSBO(); CResult oResult = new CResult(); oResult = oCCSDDSSBO.Delete(oCCSDDSS, this.eTable); if (oResult.IsSuccess) { MessageBox.Show("Deleted successfully"); } else { MessageBox.Show(oResult.ErrMsg); } LoadAllCCSDDSS(); } }