예제 #1
0
        private void B_SAVE1_Click(object sender, EventArgs e)
        {
            Cursor = Cursors.WaitCursor;
            Boolean result = false;

            this.model.remakr2     = remakr2.Text;
            this.model.remark      = remark.Text;
            this.model.ath_id      = (accessCode == null) ? model.ath_id : accessCode.ath_code;
            this.model.update_by   = (onlineStatus) ? this.main.staffModel.id : staffId;
            this.model.update_date = DateTime.Now;
            if ((onlineStatus) ? tranDao.Update(this.model, StationID) : tranDao.UpdateOffline(this.model, StationID))
            {
                accessCode.ath_use = "1";
                result             = (onlineStatus) ? authenDao.Update(accessCode) : authenDao.UpdateOffine(accessCode);
            }
            MessageBox.Show("บันทึกข้อมูลเรียบร้อยแล้ว");
            //Refresh Main
            accessCode = null;
            main.refreshData();
            clear();
            Cursor = Cursors.Default;
            Close();
        }