/// <summary> /// Method To Populate the Record in Find User /// </summary> public void ViewUserData(object obj) { CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgStart, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name)); try { cmdName = Resources.msgview; VisibilityEditUserTab = true; FindUserDeligate.SetValueMethod(((AppWorks.UI.ViewModel.AdminUser.UserDetails)(obj)).UdUserCode); FindUserDeligate.SetValueMethodCmd(cmdName); SeletedTabFinduser = 1; } catch (Exception ex) { LogHelper.LogErrorToDb(ex); bool displayErrorOnUI = false; CommonSettings.logger.LogError(this.GetType(), ex); if (displayErrorOnUI) { throw; } } finally { CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgEnd, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name)); } }
/// <summary> /// Method To Populate the Record in Find User /// </summary> public void FillUserDataOnSelection(object obj) { CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgStart, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name)); try { Telerik.Windows.Controls.GridView.GridViewCell objSelectedUser = (Telerik.Windows.Controls.GridView.GridViewCell)obj; //AppWorks.UI.ViewModel.AdminUser.UserDetails selected = (AppWorks.UI.ViewModel.AdminUser.UserDetails) objSelectedUser; cmdName = Resources.btnView; VisibilityEditUserTab = true; FindUserDeligate.SetValueMethod(((AppWorks.UI.ViewModel.AdminUser.UserDetails)(objSelectedUser.Value)).UdUserCode); FindUserDeligate.SetValueMethodCmd(cmdName); SeletedTabFinduser = 1; //foreach (System.Windows.Window window in System.Windows.Application.Current.Windows) //{ // if (window.Title.Equals("Find User")) // { // window.Close(); // } //} } catch (Exception ex) { LogHelper.LogErrorToDb(ex); bool displayErrorOnUI = false; CommonSettings.logger.LogError(this.GetType(), ex); if (displayErrorOnUI) { throw; } } finally { CommonSettings.logger.LogInfo(typeof(string), string.Format(CultureInfo.InvariantCulture, Resources.loggerMsgEnd, DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString(), MethodBase.GetCurrentMethod().Name)); } }