private void mnuFileLogoff_Click(object sender, EventArgs e) { CloseAllOpenWindows(); this.Hide(); //*****************************Added 6/12/15 moLog.Name = this.UserName; //moLog.Save(); // moLog.Save_LogOff(); // MessageBox.Show(msCurrentUserName + ".....logging off"); //CDbLog.UpdateFor_LogOff(msCurrentUserName); CDbLog.UpdateFor_LogOff_Global(Common.GlobalVar.GlobalValue); //*************************12/1 calcelClicked = false; //************************Added 6/25/15 // redo the login FLogin fl = new FLogin(); fl.OnSuccessLogin += new LoginSuccessful(fl_OnSuccessLogin); //fl.OnCancelLogin += new EventHandler(fl_OnCancelLogin); fl.ShowDialog(); fl.OnSuccessLogin -= new LoginSuccessful(fl_OnSuccessLogin); //fl.OnCancelLogin -= new EventHandler(fl_OnCancelLogin); fl.Close(); }
public int Save() { CDbLog dbDt = new CDbLog(); string tmpDat; int retVal; tmpDat = GetDataString(); retVal = dbDt.SaveNew(tmpDat); base.ID = retVal; dbDt = null; return(retVal); }
private void FMain_FormClosing(object sender, FormClosingEventArgs e) { // if (MessageBox.Show("Are you sure you wish to exit PCATS?", "Exit PCATS", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) // { RSLib.COAppSetting aps = new RSLib.COAppSetting(); aps.InitAppSettings(); if (this.WindowState == FormWindowState.Maximized) { aps.WindowMax = true; } else { aps.WindowMax = false; aps.WindowHt = this.Height; aps.WindowWid = this.Width; } aps.SaveAppSettings(); RSLib.COSecurity.Delete(); //*****************************Added 6/16/15 *****************MZ if (calcelClicked == true) { moLog.Name = this.UserName; // moLog.Save_LogOff(); //****************************************12/1 commented } //tried 6/25/2015 //************************************************************* //} //else; //{ // e.Cancel = true; // this.Activate(); //} // CDbLog.UpdateFor_LogOff(msCurrentUserName); CDbLog.UpdateFor_LogOff_Global(Common.GlobalVar.GlobalValue); // MessageBox.Show(msCurrentUserName + ".....logging off"); }