コード例 #1
0
 public NoteDialog(GameStats game)
 {
     InitializeComponent();
     _game = game;
     CheckBoxEnterToSave.IsChecked = Config.Instance.EnterToSaveNote;
     Show();
     Activate();
     TextBoxNote.Focus();
     _initialized = true;
 }
コード例 #2
0
        private void BtnDeck_Click(object sender, RoutedEventArgs e)
        {
            if (DeckListContainer.Visibility == Visible)
            {
                DeckPanelVisibility(Collapsed, 3, true);
            }
            else
            {
                DeckPanelVisibility(Visible, 2, false);
            }

            TextBoxNote.Focus();
        }
コード例 #3
0
        public NoteDialog(GameStats game, List <Image> screenshots)
        {
            InitializeComponent();
            _game = game;
            CheckBoxEnterToSave.IsChecked = Config.Instance.EnterToSaveNote;
            Show();
            Activate();
            TextBoxNote.Focus();

            ListBox_Images.DataContext = screenshots;

            _initialized = true;
        }
コード例 #4
0
 private void TextBoxNote_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter && (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control)
     {
         TextBoxNote.Text          += Environment.NewLine;
         TextBoxNote.SelectionStart = TextBoxNote.Text.Length;
         TextBoxNote.ScrollToEnd();
     }
     else if (e.Key == Key.Enter)
     {
         Finish();
     }
 }
コード例 #5
0
 public NoteDialog(GameStats game)
 {
     InitializeComponent();
     _game = game;
     CheckBoxEnterToSave.IsChecked = Config.Instance.EnterToSaveNote;
     TextBoxNote.Text     = game.Note;
     DeckList.ItemsSource = game.OpponentCards
                            .Select(x => new NoteCard(x))
                            .OrderBy(x => x.Cost);
     Show();
     Activate();
     TextBoxNote.Focus();
     _initialized = true;
 }
コード例 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DataRow dr = new DataManager().GetAssignment(Convert.ToInt32(Request.QueryString["id"]));

            TextBoxStart.Text   = ((DateTime)dr["AssignmentStart"]).ToString();
            TextBoxEnd.Text     = ((DateTime)dr["AssignmentEnd"]).ToString();
            TextBoxUpdated.Text = ((DateTime)dr["AssignmentPriority"]).ToString();
            TextBoxNote.Text    = Convert.ToString(dr["AssignmentNote"]);
            DropDownListLocation.SelectedValue = Convert.ToString(dr["LocationId"]);

            DropDownListLocation.DataSource = new DataManager().GetLocationsChildren();

            TextBoxNote.Focus();

            DataBind();
        }
    }
コード例 #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            TextBoxStart.Text = Convert.ToDateTime(Request.QueryString["start"]).ToString();
            TextBoxEnd.Text   = Convert.ToDateTime(Request.QueryString["end"]).ToString();

            TextBoxNote.Focus();

            DropDownListLocation.DataSource = new DataManager().GetLocationsChildren();

            if (!String.IsNullOrEmpty(Request.QueryString["table"]))
            {
                DropDownListLocation.SelectedValue = Request.QueryString["table"];
            }

            DataBind();
        }
    }
コード例 #8
0
 private void DeckPanelVisibility(Visibility visibility, int span, bool show)
 {
     DeckListContainer.Visibility = visibility;
     TextBoxNote.SetValue(Grid.ColumnSpanProperty, span);
     BtnDeck.Content = LocUtil.Get(show ? LocShowDeck : LocHideDeck);
 }
コード例 #9
0
        private string GetStrCondition()
        {
            string condition   = "1=1";
            string QRcondition = "";

            //以下语句为准备查询条件
            //物料代码条件
            if (TextBoxCode.Text.Trim() != "")
            {
                condition = " QROut_MatCode LIKE '%" + TextBoxCode.Text.Trim() + "%'";
                addQueryItem(PageName, "TextBoxCode", TextBoxCode.GetType().ToString(), TextBoxCode.Text.Trim());

                //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                if (DropDownListPlanno.SelectedValue != "1")
                {
                    QRcondition += " and QROut_MatCode like '%" + TextBoxCode.Text.Trim() + "%'";
                }
                //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            }

            //物料名称条件
            if ((TextBoxName.Text.Trim() != "") && (condition != ""))
            {
                condition += " AND " + " MaterialName LIKE '%" + TextBoxName.Text.Trim() + "%'";
                addQueryItem(PageName, "TextBoxName", TextBoxName.GetType().ToString(), TextBoxName.Text.Trim());
                //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                if (DropDownListPlanno.SelectedValue != "1")
                {
                    QRcondition += " and MaterialName like '%" + TextBoxName.Text.Trim() + "%'";
                }
                //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            }

            //标识号
            if ((TextBoxNO.Text.Trim() != "") && (condition != ""))
            {
                condition += " AND " + " CGMODE LIKE '%" + TextBoxNO.Text.Trim().ToUpper() + "%'";
                addQueryItem(PageName, "TextBoxNO", TextBoxNO.GetType().ToString(), TextBoxNO.Text.Trim());
            }
            //计划跟踪号条件
            if ((TextBoxPTC.Text.Trim() != "") && (condition != ""))
            {
                if (TextBoxPTC.Text.Trim() == "备库")
                {
                    condition += " AND " + " (PTC LIKE '%备库%' or PTC LIKE '%BEIKU%')";
                    addQueryItem(PageName, "TextBoxPTC", TextBoxPTC.GetType().ToString(), TextBoxPTC.Text.Trim());
                }
                else
                {
                    condition += " AND " + " PTC LIKE'%" + TextBoxPTC.Text.Trim() + "%'";
                    addQueryItem(PageName, "TextBoxPTC", TextBoxPTC.GetType().ToString(), TextBoxPTC.Text.Trim());
                }
            }
            //批号条件
            if ((TextBoxLotNumber.Text != "") && (condition != ""))
            {
                condition += " AND " + " PTC LIKE '%" + TextBoxLotNumber.Text.Trim() + "%'";
                addQueryItem(PageName, "TextBoxLotNumber", TextBoxLotNumber.GetType().ToString(), TextBoxLotNumber.Text.Trim());
            }
            //型号规格条件
            if ((TextBoxStandard.Text != "") && (condition != ""))
            {
                condition += " AND " + " Standard LIKE '%" + TextBoxStandard.Text.Trim() + "%'";
                addQueryItem(PageName, "TextBoxStandard", TextBoxStandard.GetType().ToString(), TextBoxStandard.Text.Trim());
                //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                if (DropDownListPlanno.SelectedValue != "1")
                {
                    QRcondition += " and Standard like '%" + TextBoxStandard.Text.Trim() + "%'";
                }
                //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            }
            //长度条件
            if ((TextBoxLength.Text != "") && (condition != ""))
            {
                condition += " AND " + " Length LIKE '%" + TextBoxLength.Text.Trim() + "%'";
                addQueryItem(PageName, "TextBoxLength", TextBoxLength.GetType().ToString(), TextBoxLength.Text.Trim());
            }
            //宽度条件
            if ((TextBoxWidth.Text != "") && (condition != ""))
            {
                condition += " AND " + " Width LIKE '%" + TextBoxWidth.Text.Trim() + "%'";
                addQueryItem(PageName, "TextBoxWidth", TextBoxWidth.GetType().ToString(), TextBoxWidth.Text.Trim());
            }
            //材质条件
            if ((TextBoxAttribute.Text != "") && (condition != ""))
            {
                condition += " AND " + " Attribute LIKE '%" + TextBoxAttribute.Text.Trim() + "%'";
                addQueryItem(PageName, "TextBoxAttribute", TextBoxAttribute.GetType().ToString(), TextBoxAttribute.Text.Trim());
                //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                if (DropDownListPlanno.SelectedValue != "1")
                {
                    QRcondition += " and Attribute like '%" + TextBoxAttribute.Text.Trim() + "%'";
                }
                //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            }
            //是否定尺
            if ((TextBoxFixed.Text != "") && (condition != ""))
            {
                condition += " AND " + " Fixed LIKE '%" + TextBoxFixed.Text.Trim().ToUpper() + "%'";
                addQueryItem(PageName, "TextBoxFixed", TextBoxFixed.GetType().ToString(), TextBoxFixed.Text.Trim());
            }
            //备注条件
            if ((TextBoxNote.Text != "") && (condition != ""))
            {
                condition += " AND " + " Note LIKE '%" + TextBoxNote.Text.Trim() + "%'";
                addQueryItem(PageName, "TextBoxNote", TextBoxNote.GetType().ToString(), TextBoxNote.Text.Trim());
            }

            //订单编号条件
            if ((TextBoxOrderCode.Text != "") && (condition != ""))
            {
                condition += " AND " + " OrderCode LIKE '%" + TextBoxOrderCode.Text.Trim() + "%'";
                addQueryItem(PageName, "TextBoxOrderCode", TextBoxOrderCode.GetType().ToString(), TextBoxOrderCode.Text.Trim());
            }


            //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            //是否出库(即是否生成入库单)
            if ((DropDownListQROutState.SelectedValue != "") && (condition != ""))
            {
                condition += " AND " + " QROut_State='" + DropDownListQROutState.SelectedValue + "'";
                addQueryItem(PageName, "DropDownListQROutState", DropDownListQROutState.GetType().ToString(), DropDownListQROutState.SelectedValue);

                //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                QRcondition += " and QROut_State='" + DropDownListQROutState.SelectedValue + "'";
                //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
            }
            if ((DropDownListQROutState.SelectedValue == "") && (condition != ""))
            {
                condition += " AND " + " (QROut_State='0' or QROut_State='1')";
                addQueryItem(PageName, "DropDownListQROutState", DropDownListQROutState.GetType().ToString(), DropDownListQROutState.SelectedValue);
            }
            //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

            //仓库条件
            if ((WarehouseDropDownList.SelectedValue != "0") && (ChildWarehouseDropDownList.SelectedValue != "0"))
            {
                if (condition != "")
                {
                    condition += " AND " + " WarehouseCode='" + ChildWarehouseDropDownList.SelectedValue + "'";
                    addQueryItem(PageName, "WarehouseDropDownList", WarehouseDropDownList.GetType().ToString(), WarehouseDropDownList.SelectedValue);
                    addQueryItem(PageName, "ChildWarehouseDropDownList", ChildWarehouseDropDownList.GetType().ToString(), ChildWarehouseDropDownList.SelectedValue);
                }
                else
                {
                    condition += " WarehouseCode='" + ChildWarehouseDropDownList.SelectedValue + "'";
                    addQueryItem(PageName, "WarehouseDropDownList", WarehouseDropDownList.GetType().ToString(), WarehouseDropDownList.SelectedValue);
                    addQueryItem(PageName, "ChildWarehouseDropDownList", ChildWarehouseDropDownList.GetType().ToString(), ChildWarehouseDropDownList.SelectedValue);
                }
            }
            else if ((WarehouseDropDownList.SelectedValue != "0") && (ChildWarehouseDropDownList.SelectedValue == "0"))
            {
                if (condition != "")
                {
                    condition += " AND " + " WarehouseCode LIKE '" + WarehouseDropDownList.SelectedValue + "%'";
                    addQueryItem(PageName, "WarehouseDropDownList", WarehouseDropDownList.GetType().ToString(), WarehouseDropDownList.SelectedValue);
                    addQueryItem(PageName, "ChildWarehouseDropDownList", ChildWarehouseDropDownList.GetType().ToString(), ChildWarehouseDropDownList.SelectedValue);
                }
                else
                {
                    condition += " WarehouseCode LIKE '" + WarehouseDropDownList.SelectedValue + "%'";
                    addQueryItem(PageName, "WarehouseDropDownList", WarehouseDropDownList.GetType().ToString(), WarehouseDropDownList.SelectedValue);
                    addQueryItem(PageName, "ChildWarehouseDropDownList", ChildWarehouseDropDownList.GetType().ToString(), ChildWarehouseDropDownList.SelectedValue);
                }
            }

            //物料条件
            if ((TypeDropDownList.SelectedValue != "0") && (SubTypeDropDownList.SelectedValue != "0"))
            {
                if (condition != "")
                {
                    condition += " AND " + " QROut_MatCode LIKE '" + SubTypeDropDownList.SelectedValue + "%'";
                    addQueryItem(PageName, "TypeDropDownList", TypeDropDownList.GetType().ToString(), TypeDropDownList.SelectedValue);
                    addQueryItem(PageName, "SubTypeDropDownList", SubTypeDropDownList.GetType().ToString(), SubTypeDropDownList.SelectedValue);
                }
                else
                {
                    condition += " QROut_MatCode LIKE '" + SubTypeDropDownList.SelectedValue + "%'";
                    addQueryItem(PageName, "TypeDropDownList", TypeDropDownList.GetType().ToString(), TypeDropDownList.SelectedValue);
                    addQueryItem(PageName, "SubTypeDropDownList", SubTypeDropDownList.GetType().ToString(), SubTypeDropDownList.SelectedValue);
                }
            }
            else if ((TypeDropDownList.SelectedValue != "0") && (SubTypeDropDownList.SelectedValue == "0"))
            {
                if (condition != "")
                {
                    condition += " AND " + " QROut_MatCode LIKE '" + TypeDropDownList.SelectedValue + "%'";
                    addQueryItem(PageName, "TypeDropDownList", TypeDropDownList.GetType().ToString(), TypeDropDownList.SelectedValue);
                    addQueryItem(PageName, "SubTypeDropDownList", SubTypeDropDownList.GetType().ToString(), SubTypeDropDownList.SelectedValue);
                }
                else
                {
                    condition += " QROut_MatCode LIKE '" + TypeDropDownList.SelectedValue + "%'";
                    addQueryItem(PageName, "TypeDropDownList", TypeDropDownList.GetType().ToString(), TypeDropDownList.SelectedValue);
                    addQueryItem(PageName, "SubTypeDropDownList", SubTypeDropDownList.GetType().ToString(), SubTypeDropDownList.SelectedValue);
                }
            }
            if (DropDownListPlanno.SelectedValue == "1")
            {
                condition = condition;
            }
            else
            {
                condition = condition + " or ((PTC is null or PTC='')" + QRcondition + ")";
            }
            return(condition);
        }
コード例 #10
0
 private void DeckPanelVisibility(Visibility visibility, int span, string prefix)
 {
     DeckListContainer.Visibility = visibility;
     TextBoxNote.SetValue(Grid.ColumnSpanProperty, span);
     BtnDeck.Content = $"{prefix} OPP DECK";
 }