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(); pbProfileImage.Image = zsi.PhotoFingCapture.Util.ByteArrayToImage(info.FrontImg); this.Invoke(new Function(delegate() { txtName.Text = "(" + info.EmployeeNo + ") - " + info.FullName; dcTimeInOutLog_OleDb dc = new dcTimeInOutLog_OleDb(); DateTime TimeIn; DateTime TimeOut; dc.TimeInOut(info, DateTime.Now,out TimeIn,out TimeOut); if (TimeIn == new DateTime(1, 1, 1)) lblActualTimeIn.Text = "00:00:00"; else lblActualTimeIn.Text = TimeIn.ToLongTimeString(); if (TimeOut == new DateTime(1, 1, 1)) lblActualTimeOut.Text = "00:00:00"; else lblActualTimeOut.Text = TimeOut.ToLongTimeString(); })); } 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; } }