/// <summary> /// 根据主键索引,获得指定的假期记录以便查看编辑 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void clientAtt_GetLeaveTypeSetByIDCompleted(object sender, GetLeaveTypeSetByIDCompletedEventArgs e) { if (e.Error == null) { entLeaveTypeSet = e.Result; this.DataContext = entLeaveTypeSet; cbxkLeaveTypeValue.IsEnabled = false; cbxEntryRestrict.IsChecked = false; if (entLeaveTypeSet.ENTRYRESTRICT == (Convert.ToInt32(IsChecked.Yes) + 1).ToString()) { cbxEntryRestrict.IsChecked = true; } toolbar1.IsEnabled = false; dataPager.IsEnabled = false; if (entLeaveTypeSet.FINETYPE == (Convert.ToInt32(LeaveFineType.Free) + 1).ToString()) { toolbar1.IsEnabled = true; dataPager.IsEnabled = true; } CheckIsFreeLeave(); BindGrid(); SetToolBar(); } else { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); } loadbar.Stop(); }
/// <summary> /// 根据主键索引,获得指定的假期记录以便查看编辑 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void clientAtt_GetLeaveTypeSetByIDCompleted(object sender, GetLeaveTypeSetByIDCompletedEventArgs e) { if (e.Error == null) { entLeaveTypeSet = e.Result; this.DataContext = entLeaveTypeSet; cbxkLeaveTypeValue.IsEnabled = false; cbxEntryRestrict.IsChecked = false; if (entLeaveTypeSet.ENTRYRESTRICT == (Convert.ToInt32(IsChecked.Yes) + 1).ToString()) { cbxEntryRestrict.IsChecked = true; } toolbar1.IsEnabled = false; dataPager.IsEnabled = false; if (entLeaveTypeSet.FINETYPE == (Convert.ToInt32(LeaveFineType.Free) + 1).ToString()) { toolbar1.IsEnabled = true; dataPager.IsEnabled = true; } CheckIsFreeLeave(); BindGrid(); SetToolBar(); if (!string.IsNullOrEmpty(entLeaveTypeSet.SEXRESTRICT)) { string strSex = entLeaveTypeSet.SEXRESTRICT; if (strSex == "0") { rbWomen.IsChecked = true; } if (strSex == "1") { rbMan.IsChecked = true; } if (strSex == "2") { rbNoLimit.IsChecked = true; } } else { rbNoLimit.IsChecked = true; } } else { Utility.ShowCustomMessage(MessageTypes.Error, Utility.GetResourceStr("ERROR"), Utility.GetResourceStr(e.Error.Message)); } loadbar.Stop(); }