Exemplo n.º 1
0
 public void Execute(object parameter)
 {
     try
     {
         CellCommandParameter cellCommandParameter = (CellCommandParameter)parameter;
         if (cellCommandParameter.Area == SpreadArea.Cells &&
             cellCommandParameter.CellPosition.Row >= 0 &&
             cellCommandParameter.CellPosition.Row < this._gcSpreadGrid.Rows.Count
             )
         {
             int rowNo = cellCommandParameter.CellPosition.Row;
             var row   = this._gcSpreadGrid.Rows[rowNo];
             var sNo   = row.Cells[this._gcSpreadGrid.Columns["車輌コード"].Index].Value;
             var sNe   = row.Cells[this._gcSpreadGrid.Columns["年月"].Index].Value;
             var sTe   = row.Cells[this._gcSpreadGrid.Columns["点検日"].Index].Value;
             var wnd   = GetWindow(this._gcSpreadGrid);
             if ((int?)sNo != null && (int?)sNe != null)
             {
                 SRY22020 frm = new SRY22020();
                 frm.初期車輌コード = (int?)sNo;
                 frm.初期作成年月  = (int?)sNe;
                 frm.初期点検日   = (int?)sTe;
                 frm.ShowDialog(wnd);
             }
         }
     }
     catch (Exception ex)
     {
     }
     finally
     {
         this._gcSpreadGrid.IsEnabled = true;
     }
 }
Exemplo n.º 2
0
            public void Execute(object parameter)
            {
                CellCommandParameter cellCommandParameter = (CellCommandParameter)parameter;

                if (cellCommandParameter.Area == SpreadArea.Cells)
                {
                    int rowNo = cellCommandParameter.CellPosition.Row;
                    var row   = this._gcSpreadGrid.Rows[rowNo];
                    var 品番コード = row.Cells[GridColumnsMapping.品番コード.GetHashCode()].Value;

                    // 未設定行の場合は処理しない
                    if (品番コード == null || string.IsNullOrEmpty(品番コード.ToString()))
                    {
                        return;
                    }

                    throw new NotImplementedException("画面未実装");
                    //var p商品ID = row.Cells[this._gcSpreadGrid.Columns["商品ID"].Index].Value;
                    //var p入庫日 = row.Cells[this._gcSpreadGrid.Columns["str入庫日"].Index].Value;
                    //var p保管料計算開始日 = row.Cells[this._gcSpreadGrid.Columns["str保管料計算開始日"].Index].Value;
                    //var p賞味期限 = row.Cells[this._gcSpreadGrid.Columns["str賞味期限"].Index].Value;
                    //var pロケーション番号 = row.Cells[this._gcSpreadGrid.Columns["ロケーション"].Index].Value;
                    //var pロット番号 = row.Cells[this._gcSpreadGrid.Columns["ロット番号"].Index].Value;
                    //var p得意先コード = row.Cells[this._gcSpreadGrid.Columns["得意先コード"].Index].Value;
                    //var wnd = GetWindow(this._gcSpreadGrid);
                    //var query = this._gcSpreadGrid.ItemsSource;
                    //DateTime Wk;
                    //DateTime? d入庫日, d賞味期限;
                    //d入庫日 = p入庫日 == null ? (DateTime?)null : DateTime.TryParse(p入庫日.ToString(), out Wk) ? Wk : (DateTime?)null;
                    //d賞味期限 = p賞味期限 == null ? (DateTime?)null : DateTime.TryParse(p賞味期限.ToString(), out Wk) ? Wk : (DateTime?)null;

                    //var innercmd在庫詳細 = typeof(DLY31010.cmd在庫詳細);
                    //var outercmd在庫詳細 = innercmd在庫詳細.DeclaringType;


                    //DLY31020 frm = new DLY31020();
                    //frm.在庫参照元 = 1;
                    //frm.在庫商品ID = p商品ID == null ? string.Empty : (string)p商品ID;
                    //frm.在庫入庫日 = d入庫日;
                    //frm.在庫保管料計算開始日 = (DateTime?)null;
                    //frm.在庫賞味期限 = d賞味期限;
                    //frm.在庫ロケーション番号 = pロケーション番号 == null ? string.Empty : (string)pロケーション番号;
                    //frm.在庫ロット番号 = pロット番号 == null ? string.Empty : (string)pロット番号;
                    //frm.得意先コード = (int?)p得意先コード;
                    //frm.在庫行番号 = (int?)rowNo;
                    //frm.出庫データ = query;

                    //frm.ShowDialog(wnd);

                    //this._gcSpreadGrid.Columns["在庫照会"].Focusable = false;
                }
            }
Exemplo n.º 3
0
            /// <summary>
            /// 確定ボタン押下
            /// </summary>
            /// <param name="parameter"></param>
            public void Execute(object parameter)
            {
                CellCommandParameter cellCommandParameter = (CellCommandParameter)parameter;
                var    parent = ViewBaseCommon.FindVisualParent <TKS90010>(this._gcSpreadGrid);
                string msg    = string.Empty;

                if (cellCommandParameter.Area == SpreadArea.Cells)
                {
                    int rowNo     = cellCommandParameter.CellPosition.Row;
                    var row       = this._gcSpreadGrid.Rows[rowNo];
                    var fixKbn    = row.Cells[(int)GridColumnsMapping.確定区分].Value;
                    var fixDay    = row.Cells[(int)GridColumnsMapping.確定日].Value;
                    var closeDay  = row.Cells[(int)GridColumnsMapping.締日].Value;
                    var toriKbn   = row.Cells[(int)GridColumnsMapping.取引区分ID].Value;
                    var toriKbnNm = row.Cells[(int)GridColumnsMapping.取引区分].Value;
                    var jisCode   = row.Cells[(int)GridColumnsMapping.自社コード].Value;

                    // エラー情報をクリア
                    row.ValidationErrors.Clear();

                    if (fixDay == null || fixDay.ToString() == DEFAULT_YYMMDD)
                    {
                        msg = "確定日を設定してください。";
                        CellPosition cp = new CellPosition(rowNo, GridColumnsMapping.確定日.GetHashCode());
                        this._gcSpreadGrid[cp].ValidationErrors.Add(new SpreadValidationError(msg, null));
                        MessageBox.Show(msg);
                        return;
                    }

                    if (MessageBox.Show(
                            string.Format("{0}日締の{1}を {2} で確定登録します。\n確定日以前の伝票は編集できなくなります。\nよろしいですか?"
                                          , closeDay.ToString()
                                          , toriKbnNm.ToString()
                                          , fixDay.ToString()),
                            "登録確認",
                            MessageBoxButton.YesNo,
                            MessageBoxImage.Question,
                            MessageBoxResult.Yes) == MessageBoxResult.No)
                    {
                        return;
                    }

                    // 登録処理を呼び出し
                    parent.UpdateTableData(jisCode.ToString(), fixKbn.ToString(), closeDay.ToString(), fixDay.ToString(), toriKbn.ToString());
                }
            }
Exemplo n.º 4
0
            public void Execute(object parameter)
            {
                CellCommandParameter cellCommandParameter = (CellCommandParameter)parameter;

                if (cellCommandParameter.Area == SpreadArea.Cells)
                {
                    int rowNo = cellCommandParameter.CellPosition.Row;
                    var row   = this._gcSpreadGrid.Rows[rowNo];
                    var wnd   = GetWindow(this._gcSpreadGrid);

                    var a = row.Cells[this._gcSpreadGrid.Columns["開始日付1"].Index].CellType;
                    var b = row.Cells[this._gcSpreadGrid.Columns["開始日付2"].Index].CellType;
                    row.Cells[this._gcSpreadGrid.Columns["開始日付1"].Index].Value = row.Cells[this._gcSpreadGrid.Columns["クリア開始日付"].Index].Value;
                    row.Cells[this._gcSpreadGrid.Columns["終了日付1"].Index].Value = row.Cells[this._gcSpreadGrid.Columns["クリア終了日付"].Index].Value;
                    row.Cells[this._gcSpreadGrid.Columns["開始日付2"].Index].Value = DBNull.Value;
                    row.Cells[this._gcSpreadGrid.Columns["終了日付2"].Index].Value = DBNull.Value;
                    row.Cells[this._gcSpreadGrid.Columns["開始日付3"].Index].Value = DBNull.Value;
                    row.Cells[this._gcSpreadGrid.Columns["終了日付3"].Index].Value = DBNull.Value;
                }
            }
Exemplo n.º 5
0
 public void Execute(object parameter)
 {
     try
     {
         this._gcSpreadGrid.IsEnabled = false;
         CellCommandParameter cellCommandParameter = (CellCommandParameter)parameter;
         if (cellCommandParameter.Area == SpreadArea.Cells &&
             cellCommandParameter.CellPosition.Row >= 0 &&
             cellCommandParameter.CellPosition.Row < this._gcSpreadGrid.Rows.Count
             )
         {
             this._gcSpreadGrid.SelectedItems.Remove(cellCommandParameter.CellPosition.Row);
             this._gcSpreadGrid.Rows.Remove(cellCommandParameter.CellPosition.Row);
         }
     }
     catch (Exception ex)
     {
     }
     finally
     {
         this._gcSpreadGrid.IsEnabled = true;
     }
 }
Exemplo n.º 6
0
            public void Execute(object parameter)
            {
                CellCommandParameter cellCommandParameter = (CellCommandParameter)parameter;

                if (cellCommandParameter.Area == SpreadArea.Cells)
                {
                    int rowNo = cellCommandParameter.CellPosition.Row;
                    var row   = this._gcSpreadGrid.Rows[rowNo];
                    var mNo   = row.Cells[this._gcSpreadGrid.Columns["明細番号"].Index].Value;
                    var wnd   = GetWindow(this._gcSpreadGrid);

                    DLY09010 frm = new DLY09010();
                    frm.初期明細番号 = (int?)mNo;
                    frm.ShowDialog(wnd);

                    if (frm.IsUpdated)
                    {
                        // 日報側で更新された場合、再検索を実行する
                        var parent = ViewBaseCommon.FindVisualParent <DLY16010>(this._gcSpreadGrid);
                        parent.Button_Click_1(null, null);
                    }
                }
            }
Exemplo n.º 7
0
            public void Execute(object parameter)
            {
                CellCommandParameter cellCommandParameter = (CellCommandParameter)parameter;

                if (cellCommandParameter.Area == SpreadArea.Cells)
                {
                    int rowNo = cellCommandParameter.CellPosition.Row;
                    var row   = this._gcSpreadGrid.Rows[rowNo];

/*
 *                  var wnd = GetWindow(this._gcSpreadGrid);
 *                  //表示区分
 *                  int i表示区分 = Convert.ToInt32(this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["表示区分"].Index].Value.ToString());
 *                  string d検索日付FROM = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["検索日付FROM"].Index].Value.ToString();
 *                  string d検索日付TO = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["検索日付TO"].Index].Value.ToString();
 *
 *                  if (i表示区分 == 0)
 *                  {
 *
 *                      string s得意先ID = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["得意先ID"].Index].Value.ToString();
 *                      string s商品ID = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["商品ID"].Index].Value.ToString();
 *
 *
 *                      //商品毎
 *                      DLY39010 frm = new DLY39010();
 *                      frm.初期得意先ID = s得意先ID;
 *                      frm.初期商品ID = s商品ID;
 *                      frm.初期表示区分 = i表示区分;
 *                      frm.初期検索日付From = Convert.ToDateTime(d検索日付FROM).ToShortDateString();
 *                      frm.初期検索日付To = Convert.ToDateTime(d検索日付TO).ToShortDateString();
 *                      frm.ShowDialog(wnd);
 *                  }
 *                  else if (i表示区分 == 1)
 *                  {
 *
 *                      string s得意先ID = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["得意先ID"].Index].Value.ToString();
 *                      string s商品ID = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["商品ID"].Index].Value.ToString();
 *                      string sロット = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["ロット番号"].Index].Value == null ? "" : this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["ロット番号"].Index].Value.ToString();
 *
 *                      //商品+ロット毎
 *                      DLY39010 frm = new DLY39010();
 *                      frm.初期得意先ID = s得意先ID;
 *                      frm.初期商品ID = s商品ID;
 *                      frm.初期ロット = sロット;
 *                      frm.初期表示区分 = i表示区分;
 *                      frm.初期検索日付From = Convert.ToDateTime(d検索日付FROM).ToShortDateString();
 *                      frm.初期検索日付To = Convert.ToDateTime(d検索日付TO).ToShortDateString();
 *                      frm.ShowDialog(wnd);
 *                  }
 *                  else if (i表示区分 == 2)
 *                  {
 *
 *                      string s得意先ID = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["得意先ID"].Index].Value.ToString();
 *                      string s商品ID = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["商品ID"].Index].Value.ToString();
 *                      string s倉庫ID = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["倉庫ID"].Index].Value.ToString();
 *
 *                      //商品+倉庫
 *                      DLY39010 frm = new DLY39010();
 *                      frm.初期得意先ID = s得意先ID;
 *                      frm.初期商品ID = s商品ID;
 *                      frm.初期倉庫ID = s倉庫ID;
 *                      frm.初期表示区分 = i表示区分;
 *                      frm.初期検索日付From = d検索日付FROM;
 *                      frm.初期検索日付To = d検索日付TO;
 *                      frm.ShowDialog(wnd);
 *                  }
 *                  else if (i表示区分 == 3)
 *                  {
 *
 *                      string s得意先ID = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["得意先ID"].Index].Value.ToString();
 *                      string s商品ID = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["商品ID"].Index].Value.ToString();
 *                      string s倉庫ID = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["倉庫ID"].Index].Value.ToString();
 *                      string sロット = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["ロット番号"].Index].Value == null ? "" : this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["ロット番号"].Index].Value.ToString();
 *                      string sロケーション = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["ロケーション"].Index].Value == null ? "" : this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["ロケーション"].Index].Value.ToString();
 *
 *                      //商品+倉庫
 *                      DLY39010 frm = new DLY39010();
 *                      frm.初期得意先ID = s得意先ID;
 *                      frm.初期商品ID = s商品ID;
 *                      frm.初期倉庫ID = s倉庫ID;
 *                      frm.初期表示区分 = i表示区分;
 *                      frm.初期ロケーション = sロケーション;
 *                      frm.初期検索日付From = d検索日付FROM;
 *                      frm.初期検索日付To = d検索日付TO;
 *                      frm.ShowDialog(wnd);
 *                  }
 *                  else if (i表示区分 == 4)
 *                  {
 *
 *                      string s得意先ID = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["得意先ID"].Index].Value.ToString();
 *                      string s商品ID = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["商品ID"].Index].Value.ToString();
 *                      string s倉庫ID = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["倉庫ID"].Index].Value.ToString();
 *                      string sロット = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["ロット番号"].Index].Value == null ? "" : this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["ロット番号"].Index].Value.ToString();
 *                      string sロケーション = this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["ロケーション"].Index].Value == null ? "" : this._gcSpreadGrid[rowNo, this._gcSpreadGrid.Columns["ロケーション"].Index].Value.ToString();
 *
 *                      //商品+倉庫+ロット
 *                      DLY39010 frm = new DLY39010();
 *                      frm.初期得意先ID = s得意先ID;
 *                      frm.初期商品ID = s商品ID;
 *                      frm.初期倉庫ID = s倉庫ID;
 *                      frm.初期ロット = sロット;
 *                      frm.初期ロケーション = sロケーション;
 *                      frm.初期表示区分 = i表示区分;
 *                      frm.初期検索日付From = d検索日付FROM;
 *                      frm.初期検索日付To = d検索日付TO;
 *                      frm.ShowDialog(wnd);
 *                  }
 */
                }
            }