Ejemplo n.º 1
0
        private CCCSDDSS GetFormData()
        {
            CCCSDDSS oCCSDDSS = new CCCSDDSS();

            oCCSDDSS.Code = txtCode.Text.Trim();
            oCCSDDSS.Name = txtName.Text.Trim();

            oCCSDDSS.IsActive = true;

            return(oCCSDDSS);
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
            }
        }