Beispiel #1
0
        //個数 検索時イベント
        private void Kosuu_PreviewKeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                int?i得意先ID = null;
                int?i着地ID  = null;

                //個数入力時
                if (LabelTextkosuu.Text == string.Empty)
                {
                    数 = 0;
                }
                else
                {
                    decimal Decit;
                    if (decimal.TryParse(LabelTextkosuu.Text, out Decit) == true)
                    {
                        数 = Decit;
                    }
                }

                if (!(LabelTextTokuisaki.CheckValidation() && LabelTextTyakuti.CheckValidation()))
                {
                    return;
                }

                try
                {
                    i得意先ID = AppCommon.IntParse(得意先ID);
                    i着地ID  = AppCommon.IntParse(着地ID);
                    base.SendRequest(new CommunicationObject(MessageType.RequestData, TargetTableNm_Newold, new object[] { i得意先ID, 重量, 数, i着地ID, 重量チェックボックス値, 数チェックボックス値 }));
                    base.SendRequest(new CommunicationObject(MessageType.RequestData, TargetTableNm_Newold2, new object[] { i得意先ID, 重量, 数, i着地ID }));
                }
                catch (Exception ex)
                {
                    appLog.Debug("【Error:{0}***{1}】", System.Reflection.MethodBase.GetCurrentMethod().Name, ex.Message);
                    this.ErrorMessage = ex.Message;
                    return;
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// 主キーテキストボックスロストフォーカス
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void UcLabelTwinTextBox_LostFocus(object sender, RoutedEventArgs e)
        {
            try
            {
                int iTokuisakiId = 0;
                int iHatutiId    = 0;
                int iTyakutiId   = 0;
                int iSyouhinId   = 0;

                if (!(LabelTextShiharai.CheckValidation() && LabelTextHatuti.CheckValidation() && LabelTextTyakuti.CheckValidation() && LabelTextSyohin.CheckValidation()))
                {
                    return;
                }

                if (発地ID == "")
                {
                    発地ID = "0";
                }
                if (着地ID == "")
                {
                    着地ID = "0";
                }

                if (int.TryParse(得意先ID, out iTokuisakiId) &&
                    int.TryParse(発地ID, out iHatutiId) &&
                    int.TryParse(着地ID, out iTyakutiId) &&
                    int.TryParse(商品ID, out iSyouhinId)
                    )
                {
                    //マスタ
                    base.SendRequest(new CommunicationObject(MessageType.RequestData, TargetTableNm, new object[] { iTokuisakiId, iHatutiId, iTyakutiId, iSyouhinId }));
                }
            }
            catch (Exception)
            {
                return;
            }
        }