コード例 #1
0
        private void mbtnSave_Click(object sender, EventArgs e)
        {
            string msg = "";

            switch (MyState)
            {
            case FormState.Add:
            case FormState.Edit:
                msg = "save";
                if (MyState == FormState.Edit)
                {
                    msg = "update";
                }
                if (MessageHelpers.ShowQuestion("Are you sure you want to " + msg + " record?") == System.Windows.Forms.DialogResult.Yes)
                {
                    SaveRecord();
                }
                break;

            case FormState.View:
                MyState = FormState.Edit;
                RecType = fxsp.RecType;
                fxspbal = new FXSPBAL();
                Init_Form();
                break;
            }
        }
コード例 #2
0
 public frmFXandSP()
 {
     InitializeComponent();
     fxspbal = new FXSPBAL();
     fxsp    = new tbl_000_FXSP();
     err     = new ErrorProviderExtended();
 }
コード例 #3
0
 public frmFXandSPList()
 {
     InitializeComponent();
     FXSPbal = new FXSPBAL();
     FormHelpers.FormatForm(this.Controls);
     RefreshGrid();
 }