protected override void BindGrid() { using (var cmd = new SqlCommand()) { cmd.CommandText = SelectSql + @" * FROM Dictionary.VW_CurrencyRate WITH (NOLOCK) WHERE " + FilterStatusSql; if (IsFiltered) { string filter = FilterHelper.CreateFilter("StartDate", cboxDate.Text, dateStartDate.DateTime, dateEndDate.DateTime, RoundingFormat.None, cmd); if (filter.Length > 0) { cmd.CommandText += " AND " + filter; } if (lookCurrency.EditValue != null) { cmd.CommandText += " AND CurrencyCode = @CurrencyCode"; cmd.Parameters.Add("@CurrencyCode", SqlDbType.NChar).Value = lookCurrency.EditValue; } } cmd.CommandText += " ORDER BY [StartDate] DESC, [CurrencyCode] ASC"; ds.VW_CurrencyRate.Clear(); ds.VW_CurrencyRate.Merge(DictionaryManager.GetDataTable(cmd)); } }
protected override void BindData() { if (Action == DatabaseAction.Edit) { var table = DictionaryManager.GetCurrencyRate(CurrencyRateID); if (table.Count == 0) { throw new ArgumentException("მონაცემი არ მოიძებნა."); } CurrencyRateID = table[0].CurrencyRateID; CurrencyCode = table[0].CurrencyCode; StartDate = table[0].StartDate; dateEndDate.EditValue = ConvertHelper.Parse(table[0]["EndDate"]); CurrencyRateOld = table[0].AverageRate; CurrencyRateNew = table[0].AverageRate; ChangePrice = table[0].Events; Status = (DatabaseStatus)table[0].Status; ModifiedUserID = table[0].ModifiedUserID; ModifiedDate = table[0].ModifiedDate; ApproverUserID = table[0].ApproverUserID; } else { StartDate = BaseGlobalVariable.ServerDateTime; ModifiedUserID = BaseGlobalVariable.UserID; ModifiedDate = BaseGlobalVariable.ServerDateTime; } }
protected override void BindData() { if (Action == DatabaseAction.Edit) { var table = DictionaryManager.GetCurrency(CurrencyCodeOld); if (table.Count == 0) { throw new ArgumentException("მონაცემი არ მოიძებნა."); } CurrencyCodeNew = table[0].CurrencyCode; CurrencyCodeOld = table[0].CurrencyCode; CurrencyName = table[0].Name; Coin = table[0].Coin; AverageRate = table[0].AverageRate; Position = table[0].Position; Status = (DatabaseStatus)table[0].Status; ModifiedUserID = table[0].ModifiedUserID; ModifiedDate = table[0].ModifiedDate; ApproverUserID = table[0].ApproverUserID; } else { ModifiedUserID = BaseGlobalVariable.UserID; ModifiedDate = BaseGlobalVariable.ServerDateTime; } }
private void ActionRecord(int rowHandle, DatabaseAction action) { var value = OptionsGrid.GridView.GetRowCellValue(rowHandle, OptionsGrid.DataKeyName); var paramInt = 0; var paramString = string.Empty; var paramGuid = Guid.Empty; var paramDateTime = DateTime.Now; if (value is int) { paramInt = (int)value; } else if (value is string) { paramString = (string)value; } else if (value is Guid) { paramGuid = (Guid)value; } else if (value is DateTime) { paramDateTime = (DateTime)value; } var e = new ActionRecordEventArgs(paramInt, paramString, paramGuid, paramDateTime, action); DictionaryManager.ActionRecord(ObjectName, e.ParamInt, e.ParamString, e.ParamDateTime, e.ParamGuid, 0, string.Empty, DateTimeHelper.MinDate, Guid.Empty, e.Action, BaseGlobalVariable.UserID, IsOnline); }
/// <summary> /// Loads the template. /// </summary> private void LoadTemplate() { string templatePath = DictionaryManager.GetTemplatePath(CMSContext.Current.TemplateId); if (!templatePath.StartsWith("~")) { templatePath = "~" + templatePath; } // Check if template exists first if (!File.Exists(Server.MapPath(templatePath))) { // Generate template file not found exception ErrorManager.GenerateError(String.Format("Template file \"{0}\" was not found. Using default template instead.", templatePath)); // get default template CMSContext.Current.TemplateId = int.Parse(GlobalVariable.GetVariable("default_template", CMSContext.Current.SiteId).ToString()); templatePath = DictionaryManager.GetTemplatePath(CMSContext.Current.TemplateId); } if (!templatePath.StartsWith("~")) { templatePath = "~" + templatePath; } Control ctrl = this.Page.LoadControl(templatePath); CMSContext.Current.ControlPlaces = ((Mediachase.Cms.Util.IPublicTemplate)ctrl).ControlPlaces; Content.Controls.Add(ctrl); }
/// <summary> /// Binds the drop down list. /// </summary> private void BindDropDownList() { DataView view = DictionaryManager.GetTemplateDto().main_Templates.DefaultView; view.RowFilter = String.Format("TemplateType = '{0}' and LanguageCode = '{1}'", "page", Thread.CurrentThread.CurrentCulture.Name); if (view.Count == 0) { view.RowFilter = String.Format("TemplateType = '{0}'", "page"); } /* * string defaultTemplate = GlobalVariable.GetVariable("default_template", CMSContext.Current.SiteId); * foreach (DataRowView row in view) * { * ToolBarItem item = new ToolBarItem(); * item.Text = row["FriendlyName"].ToString(); * item.ID = row["TemplateId"].ToString(); * TemplateItemList.Items.Add(item); * } * * TemplateFilter.SelectedValue = defaultTemplate; * */ TemplateListControl.DataSource = view; TemplateListControl.DataTextField = "FriendlyName"; TemplateListControl.DataValueField = "TemplateId"; TemplateListControl.DataBind(); TemplateListControl.SelectedValue = GlobalVariable.GetVariable("default_template", CMSContext.Current.SiteId); }
public ResumeController(IResumeQuerier resumeQuerier, IJobQuerier jobQuerier, IDictionaryQuerier dictionaryQuerier, IUserQuerier userQuerier, JobManager jobManager, ResumeManager resumeManager, ResumeAuditSettingManager resumeAuditSettingManager, ConfigurationManager configurationManager, IConfiguration configuration, IEmailSender emailSender, IServiceProvider serviceProvider, IWebHostEnvironment webEnvironment, DictionaryManager dictionaryManager) : base(serviceProvider) { _resumeQuerier = resumeQuerier; _dictionaryQuerier = dictionaryQuerier; _jobQuerier = jobQuerier; _jobManager = jobManager; _resumeManager = resumeManager; _resumeAuditSettingManager = resumeAuditSettingManager; _configurationManager = configurationManager; _userQuerier = userQuerier; _emailSender = emailSender; _configuration = configuration; _dictionaryManager = dictionaryManager; _webEnvironment = webEnvironment; InitResumeSetting(); }
void EmployeeEntryForm_Loaded(object sender, RoutedEventArgs e) { //重载提交按钮-提交先保存 EntityBrowser entBrowser = this.FindParentByType<EntityBrowser>(); entBrowser.BtnSaveSubmit.Click -= new RoutedEventHandler(entBrowser.btnSubmit_Click); entBrowser.BtnSaveSubmit.Click += new RoutedEventHandler(BtnSaveSubmit_Click); // 加载字典 DictionaryManager dicManager = new DictionaryManager(); List<string> dicCategorys = new List<string>(); dicCategorys.Add("POSTLEVEL"); dicManager.OnDictionaryLoadCompleted += (o, aregs) => { if (aregs.Error == null && aregs.Result) { InitParas(EntryId); } else { //SMT.RM.UI.Class.Utility.ShowCustomMessage(Class.MessageTypes.Error, //SMT.RM.UI.Class.Utility.GetResourceStr("ERROR"), //SMT.RM.UI.Class.Utility.GetResourceStr("加载系统字典出错,请管理员检查系统字典服务!")); } }; dicManager.LoadDictionary(dicCategorys); }
public Boolean[] GetData(Transaction tr, Document doc) { DictionaryManager dman = new DictionaryManager(); ObjectId idDic = dman.GetExtensionD(tr, doc, this.Geometry); return(dman.GetData(idDic, tr, "data").Select(x => x == "1").ToArray()); }
public DictionaryComboBox() { if (DictionNaryclinet == null) { DictionNaryclinet = new DictionaryManager(); } IsShowNullProperty = DependencyProperty.Register("IsShowNull", typeof(bool), typeof(DictionaryComboBox) , new PropertyMetadata(true, new PropertyChangedCallback(DictionaryComboBox.OnIsShowNullChanged))); SelectedValueProperty = DependencyProperty.Register("SelectedValue", typeof(string), typeof(DictionaryComboBox) , new PropertyMetadata("", new PropertyChangedCallback(DictionaryComboBox.OnSelectedValuePropertyChanged))); CategoryProperty = DependencyProperty.Register("Category", typeof(string), typeof(DictionaryComboBox) , new PropertyMetadata("", new PropertyChangedCallback(DictionaryComboBox.OnCategoryPropertyChanged))); }
void BaseForm_Loaded(object sender, RoutedEventArgs e) { DictionaryManager dm = new DictionaryManager(); if (!UIDictionary.DictOfDict.ContainsKey(this.GetType())) { if (this.Loaded != null) { this.Loaded(this, new RoutedEventArgs()); } return; } dm.OnDictionaryLoadCompleted += (o, args) => { if (this.Loaded != null) { this.Loaded(o, new RoutedEventArgs()); } }; dm.LoadDictionary(UIDictionary.DictOfDict[this.GetType()]); }
public DictionaryComboBox() { this.Style=(Style)Application.Current.Resources["ComboBoxStyle"]; IsShowNullProperty = DependencyProperty.Register("IsShowNull", typeof(bool), typeof(DictionaryComboBox) , new PropertyMetadata(true, new PropertyChangedCallback(DictionaryComboBox.OnIsShowNullChanged))); SelectedValueProperty = DependencyProperty.Register("SelectedValue", typeof(string), typeof(DictionaryComboBox) , new PropertyMetadata("", new PropertyChangedCallback(DictionaryComboBox.OnSelectedValuePropertyChanged))); CategoryProperty = DependencyProperty.Register("Category", typeof(string), typeof(DictionaryComboBox) , new PropertyMetadata("", new PropertyChangedCallback(DictionaryComboBox.OnCategoryPropertyChanged))); EventAttention = new AutoResetEvent(false); EventFunction = new AutoResetEvent(false); EventArray[0] = EventAttention; EventArray[1] = EventFunction; if (Configclient == null) { Configclient = new HrCommonServiceClient(); } //Configclient.GetAppConfigByNameCompleted += new EventHandler<GetAppConfigByNameCompletedEventArgs>(Configclient_GetAppConfigByNameCompleted); if (DictionNaryclinet == null) { DictionNaryclinet = new DictionaryManager(); } //DictionNaryclinet.GetSysDictionaryByCategoryCompleted += new EventHandler<GetSysDictionaryByCategoryCompletedEventArgs>(DictionNaryclinet_GetSysDictionaryByCategoryCompleted); }
public void WriteTo(XmlDictionaryWriter writer, DictionaryManager dictionaryManager) { _version.WriteSignatureConfirmation(writer, _id, _signatureValue); }
void BaseForm_Loaded(object sender, RoutedEventArgs e) { DictionaryManager dm = new DictionaryManager(); if (!UIDictionary.DictOfDict.ContainsKey(this.GetType())) { if (this.Loaded != null) { this.Loaded(this, new RoutedEventArgs()); } return; } dm.OnDictionaryLoadCompleted += (o, args) => { if (this.Loaded != null) { this.Loaded(o, new RoutedEventArgs()); } }; dm.LoadDictionary(UIDictionary.DictOfDict[this.GetType()]); Grid PARENT = SMT.SaaS.FrameworkUI.Common.Utility.FindChildControl<Grid>(this, "PARENT") as Grid; if (PARENT != null) { loadbar.Stop(); PARENT.Children.Add(loadbar);//在父面板中加载loading控件 } }
/// <summary> /// 绑定RadioButton /// </summary> private void BindRadioButton(string score) { DictionaryManager dicManager = new DictionaryManager(); dicManager.OnDictionaryLoadCompleted += (sender2, e2) => { List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY> dicts = Application.Current.Resources["SYS_DICTIONARY"] as List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>; var ents = dicts.Where(s => s.DICTIONCATEGORY == "MANUALTYPE").OrderBy(s => s.DICTIONARYVALUE); List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY> tempDicts = ents.ToList(); #region beyond if (tempDicts == null || tempDicts.Count == 0) { MessageBox.Show("没有加载字典:MANUALTYPE"); return; } #endregion try { if (score != null && score != "") { if (score == tempDicts[0].DICTIONARYVALUE.ToString()) { Score1.IsChecked = true; } else if (score == tempDicts[1].DICTIONARYVALUE.ToString()) { Score2.IsChecked = true; } else if (score == tempDicts[2].DICTIONARYVALUE.ToString()) { Score3.IsChecked = true; } else if (score == tempDicts[3].DICTIONARYVALUE.ToString()) { Score4.IsChecked = true; } else if (score == tempDicts[4].DICTIONARYVALUE.ToString()) { Score5.IsChecked = true; } else { } } } catch (Exception ex) { throw ex; } }; dicManager.LoadDictionary("MANUALTYPE"); }
/// <summary> /// RadioButton选项 /// </summary> private void HandleCheck(object sender, RoutedEventArgs e) { DictionaryManager dicManager = new DictionaryManager(); dicManager.OnDictionaryLoadCompleted += (sender2, e2) => { List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY> dicts = Application.Current.Resources["SYS_DICTIONARY"] as List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY>; var ents = dicts.Where(s => s.DICTIONCATEGORY == "MANUALTYPE").OrderBy(s => s.DICTIONARYVALUE); List<SMT.Saas.Tools.PermissionWS.T_SYS_DICTIONARY> tempDicts = ents.ToList(); #region beyond if (tempDicts == null || tempDicts.Count == 0) { MessageBox.Show("没有加载字典:MANUALTYPE"); return; } #endregion try { RadioButton rb = sender as RadioButton; switch (rb.Name) { case "Score1": ManualTypeScore = Convert.ToInt32(tempDicts[0].DICTIONARYVALUE); break; case "Score2": ManualTypeScore = Convert.ToInt32(tempDicts[1].DICTIONARYVALUE); break; case "Score3": ManualTypeScore = Convert.ToInt32(tempDicts[2].DICTIONARYVALUE); break; case "Score4": ManualTypeScore = Convert.ToInt32(tempDicts[3].DICTIONARYVALUE); break; case "Score5": ManualTypeScore = Convert.ToInt32(tempDicts[4].DICTIONARYVALUE); break; } } catch (Exception ex) { throw ex; } }; dicManager.LoadDictionary("MANUALTYPE"); }
/// <summary> /// 流程调用时初始化函数 /// </summary> /// <param name="companyID">公司ID</param> /// <param name="modelRelationID">业务关系ID</param> /// <param name="stepCode">步骤Code</param> /// <param name="lastStepCode">上一步步骤Code,没有上一步则为string.empty</param> /// <param name="formID">每次业务产生的表单ID</param> /// <param name="stepID">当前业务表单产生步骤记录ID</param> /// <param name="lastStepID">当前业务表单产生的上一步骤记录ID,没有上一步则为string.empty</param> /// <param name="lastStepDate">上一步完成时间,没有上一步则为null</param> /// <param name="stepDate">该步骤完成时间</param> /// <param name="AppraiseeID">被评分人ID</param> /// <param name="userID">当前用户ID</param> public void InitialInfo(string companyID, string modelRelationID, string stepCode, string lastStepCode, string formID, string stepID, string lastStepID, DateTime lastStepDate, DateTime stepDate, string AppraiseeID, string userID) { FormType = FormTypes.New; this.companyID = companyID; this.modelRelationID = modelRelationID; this.stepCode = stepCode; this.lastStepCode = lastStepCode; this.formID = formID; this.stepID = stepID; this.lastStepID = lastStepID; this.lastStepDate = lastStepDate; this.stepDate = stepDate; this.AppraiseeID = AppraiseeID; this.userID = userID; InitializeComponent(); DictionaryManager dicManager = new DictionaryManager(); dicManager.OnDictionaryLoadCompleted += (sender2, e2) => { InitPara(); //检查是否已经抽查打分 client.GetKPIRecordAsync(formID, "", stepCode, "Engine"); // 1s 冉龙军 // client.GetKPIPointAndLastPointAsync(companyID, modelRelationID, "", stepCode, lastStepCode); // 注意:空的businessID(relationID)时使用flowCode为GetKPIPoint()返回结果 //client.GetKPIPointAndLastPointAsync(companyID, modelRelationID, formID, stepCode, lastStepCode); // 1e }; dicManager.LoadDictionary("MANUALTYPE"); }
void KPIScoring_Loaded(object sender, RoutedEventArgs e) { DictionaryManager dicManager = new DictionaryManager(); dicManager.OnDictionaryLoadCompleted += (sender2, e2) => { //窗口状态 switch ((int)FormType) { case 0://NEW——手动打分 //给当前用户进行系统评分 //if (KPIPoint != null) //{ // //显示评分信息 // lblYourScore.Visibility = Visibility.Visible; // lblSysScore.Visibility = Visibility.Visible; // client.KPISystemScoreAsync(companyID, modelRelationID, formID, stepCode, formID, "", stepID, lastStepDate, stepDate, AppraiseeID); //} // 1s 冉龙军 ////给上一步KPI进行默认手动评分,默认100分 //if (LastKPIPoint != null) // client.KPIManualScoreAsync(companyID, modelRelationID, formID, lastStepCode, formID, "", lastStepID, AppraiseeID, userID, 100); // 2s 冉龙军 // 暂缓 ////取上一步KPI手动评分 //if (LastKPIPoint != null) // client.GetKPIRecordScoreDetailAsync(formID, "", stepCode, 1); // 2e break; // 1e case 1://EDIT——抽查打分 lblYourScore.Visibility = Visibility.Collapsed; lblSysScore.Visibility = Visibility.Collapsed; ////给上一步KPI进行默认抽查评分,默认100分 //if (KPIRecord != null && KPIRecord.T_HR_KPIPOINT != null) // client.KPIRandomScoreByKPIPointAsync(KPIRecord.T_HR_KPIPOINT, KPIRecord.BUSINESSCODE, formID, KPIRecord.STEPDETAILCODE, KPIRecord.APPRAISEEID, userID, 100); //取上一步KPI抽查评分 if (KPIRecord != null && KPIRecord.RANDOMSCORE != null) { //绑定RadioButton BindRadioButton(KPIRecord.RANDOMSCORE.ToString()); } break; case 2: //BROWE break; case 3: //ADUIT break; } //未获取到信息 if (KPIPoint == null) { RefreshUI(RefreshedTypes.Close); } }; dicManager.LoadDictionary("MANUALTYPE"); }
/// <summary> /// 引擎调用时的构造函数 /// </summary> /// <param name="KPIRecordID"></param> /// <param name="type"></param> public KPIScoring(string KPIRecordID, FormTypes type) { FormType = type; InitializeComponent(); string[] arr = new string[2]; DictionaryManager dicManager = new DictionaryManager(); dicManager.OnDictionaryLoadCompleted += (sender2, e2) => { InitPara(); client.GetKPIRecordByIdAsync(KPIRecordID); }; dicManager.LoadDictionary("MANUALTYPE"); }
private void BindItems(string cate) { try { DictionaryManager dm = new DictionaryManager(); dm.OnDictionaryLoadCompleted += (o, e) => { List<T_SYS_DICTIONARY> dicts = Application.Current.Resources["SYS_DICTIONARY"] as List<T_SYS_DICTIONARY>; BindComboBox(dicts, cate, SelectedValue); }; dm.LoadDictionary(cate); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
private void BindItems(string cate) { DictionaryManager dm = new DictionaryManager(); dm.OnDictionaryLoadCompleted += (o, e) => { List<T_SYS_DICTIONARY> dicts = Application.Current.Resources["SYS_DICTIONARY"] as List<T_SYS_DICTIONARY>; BindComboBox(dicts, cate, SelectedValue); }; dm.LoadDictionary(cate); }