コード例 #1
0
        //method to save data to the database
        private void SavetoolStripButton_Click(object sender, EventArgs e)
        {
            var branchdata = new Branch()
            {
                BranchName       = Branchnametextbox.Text,
                SpecialPlaceName = Specialplacetextbox.Text,
                Description      = Descriptiontextbox.Text,
                Remarks          = Remarkstextbox.Text
            };
            var dbbranchbiz = new BranchBiz();
            var result      = dbbranchbiz.Add(branchdata);

            if (result.Status)
            {
                MessageBox.Show("Successfuly Saved");
                clearbr();
            }

            else
            {
                MessageBox.Show("Save Faild." + result.Message);
            }
        }