Exemplo n.º 1
0
        public void UpdateSectionMasterDetails()
        {
            try
            {
                SectionMaster s = new SectionMaster();
                s.sectionId   = Convert.ToInt32(txtSectionId.Text);
                s.sectionName = txtSectionName.Text;
                if (cmbStatus.SelectedItem == "Active")
                {
                    s.sectionStatus = 0;
                }

                else
                {
                    s.sectionStatus = 1;
                }

                SectioMasterBL bl = new SectioMasterBL();
                int            n  = bl.UpdateSectiondata(s);
                MessageBox.Show("Record is Updated...");
            }

            catch (Exception ex)
            {
                MessageBox.Show("Records are not Saved...Please Try Again");
            }

            finally
            {
                //DisableControls(this);
            }
        }
Exemplo n.º 2
0
        public void SaveSectionDetails()
        {
            SectionMaster section = new SectionMaster();

            section.sectionId     = Convert.ToInt32(txtSectionId.Text);
            section.sectionName   = txtSectionName.Text;
            section.sectionStatus = cmbStatus.SelectedIndex;

            SectioMasterBL s = new SectioMasterBL();

            s.SaveSectionMasterdata(section);

            MessageBox.Show("Record is Saved", "Message", MessageBoxButtons.OK);

            ClearControls();
        }
Exemplo n.º 3
0
        public void DeleteSectionMasterDetails()
        {
            try
            {
                SectionMaster objSec = new SectionMaster();
                objSec.sectionId = Convert.ToInt32(txtSectionId.Text);

                SectioMasterBL bl = new SectioMasterBL();
                int            n  = bl.DeleteSectionData(objSec);
                MessageBox.Show("Record is Deleted...");
            }

            catch (Exception ex)
            {
                MessageBox.Show("Records are not Saved...Please Try Again");
            }

            finally
            {
                DisableControls(this);
            }
        }