Example #1
0
        private void Save()
        {
            IScholarshipService sService = new ScholarshipService();
            Boolean ret = false;
            string message = String.Empty;
            ScholarshipDiscount scholarship = new ScholarshipDiscount();
            if (Op.Equals("edit"))
                ret = sService.UpdateScholarship(ref scholarship, ref message);
            else
                ret = sService.CreateScholarship(ref scholarship, ref message);

            if (ret)
                MessageBox.Show("Saved Successfully");
            else
                MessageBox.Show("Error Saving");

            if (Op.Equals("edit"))
                Close();
            if (Op.Equals("new"))
            {
                Op = "edit";
                txtScholarshipCode.Enabled = false;
                gvScholarshipDetails.Enabled = true;
            }
            this.Close();
        }