private void btnOpenWebsite_Click(object sender, EventArgs e) { if (ClientSettings.UserInfo == null) { goto NotLogged; } if (ClientSettings.UserInfo.UserId == 0) { goto NotLogged; } System.Diagnostics.Process p = new System.Diagnostics.Process(); string _guID = Guid.NewGuid().ToString(); dcUser _dc = new dcUser(); _dc.UpdateRequestCode(ClientSettings.UserInfo.UserId, _guID); p.StartInfo.FileName = Settings.Default.DefaultWebsite + "Client?p_ClientAction=User Login&p_ClientRequestCode=" + _guID; p.Start(); return; NotLogged: MessageBox.Show("Please login first to open a website."); }
private void btnOpenWebsite_Click(object sender, EventArgs e) { if (ClientSettings.UserInfo == null) goto NotLogged; if (ClientSettings.UserInfo.UserId == 0) goto NotLogged; System.Diagnostics.Process p = new System.Diagnostics.Process(); string _guID = Guid.NewGuid().ToString(); dcUser _dc = new dcUser(); _dc.UpdateRequestCode(ClientSettings.UserInfo.UserId, _guID); p.StartInfo.FileName = Settings.Default.DefaultWebsite + "Client?p_ClientAction=User Login&p_ClientRequestCode=" + _guID; p.Start(); return; NotLogged: MessageBox.Show("Please login first to open a website."); }
private void ProcessProfile(Profile info) { try { string _ClientRequestCode = string.Empty; System.Diagnostics.Process p = new System.Diagnostics.Process(); dcUser _dc = new dcUser(); zsi.Framework.Security.Cryptography _crypt = new zsi.Framework.Security.Cryptography(); this.Invoke(new Function(delegate() { this.ClientAction = this.cbVerificationPurpose.SelectedItem.ToString().ToLower(); })); switch (this.ClientAction) { case "user login": //ClientSettings.UserInfo = _dc.GetUserInfo(info.ProfileId); ClientSettings.UserInfo = new User(); ClientSettings.UserInfo.UserId = info.UserId; ClientSettings.UserInfo.WSMacAddress = "add"; if (ClientSettings.UserInfo.UserId != 0) { this.Invoke(new Function(delegate(){ // this.ParentForm.EnableControls(true); this._ParentForm.CheckPermission(true); this.Close(); })); } else { MessageBox.Show("User not login."); } break; case "profile info": if (ClientSettings.UserInfo == null) goto NotYetLoggedIn; if (ClientSettings.UserInfo.UserId == 0) goto NotYetLoggedIn; if (ClientSettings.UserInfo.UserId != 0) { string _guID = Guid.NewGuid().ToString(); _dc.UpdateRequestCode(ClientSettings.UserInfo.UserId, _guID); p.StartInfo.FileName = Settings.Default.DefaultWebsite + "Client?p_ClientAction=Profile Info&p_ClientRequestCode=" + _guID + "&p_ProfileId=" + info.ProfileId; p.Start(); this.Invoke(new Function(delegate(){ this.Close(); })); } else { MessageBox.Show("User not login."); } break; default: MessageBox.Show("Finger identified: (" + info.ProfileId + ") - " + info.FullName); break; } return; NotYetLoggedIn: MessageBox.Show("Please login first."); } catch (Exception ex) { throw ex; } }
private void ProcessProfile(Profile info) { try { string _ClientRequestCode = string.Empty; System.Diagnostics.Process p = new System.Diagnostics.Process(); dcUser _dc = new dcUser(); zsi.Framework.Security.Cryptography _crypt = new zsi.Framework.Security.Cryptography(); this.Invoke(new Function(delegate() { this.ClientAction = this.cbVerificationPurpose.SelectedItem.ToString().ToLower(); })); switch (this.ClientAction) { case "user login": //ClientSettings.UserInfo = _dc.GetUserInfo(info.ProfileId); ClientSettings.UserInfo = new User(); ClientSettings.UserInfo.UserId = info.UserId; ClientSettings.UserInfo.WSMacAddress = "add"; if (ClientSettings.UserInfo.UserId != 0) { this.Invoke(new Function(delegate(){ // this.ParentForm.EnableControls(true); this._ParentForm.CheckPermission(true); this.Close(); })); } else { MessageBox.Show("User not login."); } break; case "profile info": if (ClientSettings.UserInfo == null) { goto NotYetLoggedIn; } if (ClientSettings.UserInfo.UserId == 0) { goto NotYetLoggedIn; } if (ClientSettings.UserInfo.UserId != 0) { string _guID = Guid.NewGuid().ToString(); _dc.UpdateRequestCode(ClientSettings.UserInfo.UserId, _guID); p.StartInfo.FileName = Settings.Default.DefaultWebsite + "Client?p_ClientAction=Profile Info&p_ClientRequestCode=" + _guID + "&p_ProfileId=" + info.ProfileId; p.Start(); this.Invoke(new Function(delegate(){ this.Close(); })); } else { MessageBox.Show("User not login."); } break; default: MessageBox.Show("Finger identified: (" + info.ProfileId + ") - " + info.FullName); break; } return; NotYetLoggedIn: MessageBox.Show("Please login first."); } catch (Exception ex) { throw ex; } }