示例#1
0
        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);
            }
        }
示例#2
0
        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();
        }
示例#3
0
        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();
            }
        }