public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { string result = ""; if (value is int) { int dest_id = (int)value; DestMaster dest = BaseModel.GetFirst <DestMaster>(GetDBAccess().Conn, "SELECT * FROM dest_master WHERE dest_id=" + dest_id); if (dest != null) { string localeCode = CommonUtil.GetAppLocaleCode(); // 搬送行先立寄り部署から部署名をカンマ区切りで取得 result = GetValue <string>(SectionMaster.SelectNamesSql(localeCode, dest.dest_stop_sects), "value"); if (dest.dest_round_flg != 0) { result = result + "(" + Properties.Resources.PATROL + ")"; } } } return(result); }
/// <summary> /// オーダーIDから発部署に変換 /// </summary> /// <param name="value"></param> /// <param name="targetType"></param> /// <param name="parameter"></param> /// <param name="culture"></param> /// <returns></returns> public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { int order_id; string result_value = ""; if (this.GetInt(value, out order_id)) { // order_status_logのorder_log_idの一致する行でorder_log_datetimeが最新の行が対象 OrderStatusLog order_status_log = GetOrderStatusLog(order_id); if (order_status_log != null) { string localeCode = CommonUtil.GetAppLocaleCode(); // 部署ID一覧から部署名をカンマ区切りで取得 result_value = GetValue <string>(SectionMaster.SelectNamesSql(localeCode, order_status_log.order_log_from_sect.ToString()), "value"); } } return(result_value); }