Esempio n. 1
0
        private void mbtnSave_Click(object sender, EventArgs e)
        {
            SetControlValidation();
            string msg = "";

            switch (MyState)
            {
            case FormState.Add:
            case FormState.Edit:
            case FormState.Delete:
                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;
                SectionCode = sect.SECTIONCODE;
                sectbal     = new SectionBAL();
                Init_Form();
                break;
            }
        }
Esempio n. 2
0
 public frmSection()
 {
     InitializeComponent();
     sectbal = new SectionBAL();
     sect    = new tbl_000_SECTION();
     err     = new ErrorProviderExtended();
 }
Esempio n. 3
0
        public frmUserProfile()
        {
            // constructors;
            InitializeComponent();
            userbal      = new UserBAL();
            usergroupbal = new UserGroupBAL();
            sectionbal   = new SectionBAL();
            usr          = new tbl_000_USER();
            err          = new ErrorProviderExtended();

            //get default length for username and password;
            MaxUsernameLenght = PWCOSTINGV1.Properties.Settings.Default.intUsernameLenght;
            MaxPasswordLength = PWCOSTINGV1.Properties.Settings.Default.intPasswordLength;
        }
Esempio n. 4
0
 public frmSectionList()
 {
     InitializeComponent();
     Sectionbal = new SectionBAL();
 }