Ejemplo n.º 1
0
        public string SearchSerialUpdatePO(InputProperty dataItem)
        {
            sql = @"SELECT tb2.SERIAL
			               ,tb2.ID AS ID_SERIAL
			               ,tb1.FFT_ORDER_ID
			               ,tb1.`GROUP`
			               ,tb1.FLOW_ID
			               ,tb4.INPUT_TYPE
			               ,tb6.PO 

                    FROM `input_serial` AS tb1

                    INNER JOIN `serial` AS tb2
                    ON(tb2.ID = tb1.SERIAL_ID)

                    INNER JOIN `input` AS tb3
                    ON(tb3.FFT_ORDER_ID = tb1.FFT_ORDER_ID AND tb3.`GROUP` = tb1.`GROUP`)

                    INNER JOIN `input_type` AS tb4
                    ON(tb4.ID = tb3.INPUT_TYPE_ID)

                    INNER JOIN `flow` AS tb5
                    ON(tb5.ID = tb1.FLOW_ID)

                    LEFT JOIN `po` AS tb6
                    ON(tb6.SERIAL_ID = tb1.SERIAL_ID AND tb6.FFT_ORDER_ID = tb1.FFT_ORDER_ID AND tb6.`GROUP` = tb1.`GROUP` AND tb6.FLOW_ID = tb1.FLOW_ID)

                    WHERE tb1.INUSE = '1'
                    AND tb2.SERIAL = '" + dataItem.SERIAL_NO + @"';";

            return(sql);
        }
Ejemplo n.º 2
0
        private void txtSerial_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Tab)
            {
                if (this.txtSerial.Text.Trim() != "")
                {
                    this.SetPage();

                    //Check Serial in Shippmet
                    _input                     = new InputProperty();
                    _input.Order               = new OrderProperty();
                    _input.Order.PURCHASR      = new PurchaseProperty();
                    _input.Order.PURCHASR.FLOW = new FlowProperty();
                    _input.Process             = new ProcessProperty();

                    _input.SERIAL_NO = txtSerial.Text.ToString();

                    foreach (InputProperty _checkInput in _listInputRMARework)
                    {
                        if (_checkInput.SERIAL_NO == _input.SERIAL_NO)
                        {
                            MessageBox.Show("Have Serial_NO : " + _checkInput.SERIAL_NO + " Duplicate", "Stop", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                            this.txtSerial.Clear();
                            return;
                        }
                    }

                    this.Get_purchaseBySerial();
                }
                else
                {
                    MessageBox.Show("Please input Serial_NO", "Stop", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                }
            }
        }
Ejemplo n.º 3
0
        private void txtSerial_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                if (txtSerial.Text == "")
                {
                    MessageBox.Show("Please Input Serial", "Stop", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.ClearPage();
                    return;
                }

                this.btnSave.Enabled = (this.txtSerial.Text.Count() > 0) ? true : false;

                InputProperty _searchSerial = new InputProperty
                {
                    SERIAL_NO = txtSerial.Text.Trim()
                };

                _data = new PurchaseOrderProperty();
                _data = _controller.SearchSerialUpdatePO(_searchSerial);
                if (_data.Order == null || _data.Flow == null || _data.Input == null || _data.Serial == null)
                {
                    MessageBox.Show("Not found data Please Check Serial", "Stop", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                    this.ClearPage();
                    return;
                }
                this.lblFFT_OR.Text    = _data.Order.FFT_ORDER_ID;
                this.lblGroup.Text     = _data.Order.GROUP;
                this.lblInputtype.Text = _data.Input.ORDER_TYPE_NAME;
                this.txtPO.Text        = (_data.PO != "" || _data.PO != null) ?_data.PO:"";
                this.txtPO.Enabled     = true;
            }
        }
Ejemplo n.º 4
0
    IEnumerator <float> StartHold(InputProperty _inputProperty)
    {
        yield return(Timing.WaitForOneFrame);

        while (_inputProperty.GetInput() && brain.IsLive(enterCamera))
        {
            yield return(Timing.WaitForOneFrame);
        }
        DeactivateSwitchObjects();
        ExitCamera();
    }
Ejemplo n.º 5
0
            public static void PropertySet(float gravity, float dead, float sensitivity, bool joyStickX_invert, bool joyStickY_invert)
            {
                string name = "GamePad";

                for (int i = 0; i < 5; i++)
                {
                    InputManagerSetter.ims.AddInputProperty(InputProperty.CreateGamePadProperty(name + i + "_LJoystick_X", gravity, dead, sensitivity, false, joyStickX_invert, 1, i));
                    InputManagerSetter.ims.AddInputProperty(InputProperty.CreateGamePadProperty(name + i + "_LJoystick_Y", gravity, dead, sensitivity, false, joyStickY_invert, 2, i));
                    InputManagerSetter.ims.AddInputProperty(InputProperty.CreateGamePadProperty(name + i + "_RJoystick_X", gravity, dead, sensitivity, false, joyStickX_invert, 4, i));
                    InputManagerSetter.ims.AddInputProperty(InputProperty.CreateGamePadProperty(name + i + "_RJoystick_Y", gravity, dead, sensitivity, false, joyStickY_invert, 5, i));
                    TriggerProperty(name + i + "_", gravity, dead, sensitivity, i);
                    ButtonProperty(name + i + "_", gravity, dead, sensitivity, i);
                }
            }
Ejemplo n.º 6
0
        private void txtSerial_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Tab)
            {
                if (this.txtSerial.Text.Trim() != "")
                {
                    InputProperty _input = new InputProperty();
                    _input.Order               = new OrderProperty();
                    _input.Order.PURCHASR      = new PurchaseProperty();
                    _input.Order.PURCHASR.FLOW = new FlowProperty();

                    _input.Order.FFT_ORDER_ID            = _frmMain._order.FFT_ORDER_ID.ToString();
                    _input.SERIAL_NO                     = this.txtSerial.Text.ToString();
                    _input.Order.GROUP                   = this.lblGroup.Text.ToString().Trim();
                    _input.Order.PURCHASR.FLOW.FLOW_NAME = this.cmbSelect_FlowName.Text.ToString();
                    _input.INPUT_DATE                    = DateTime.Now.ToString("yyyy-MM-dd");

                    foreach (InputProperty _checkInput in _listInputTestManufacturing)
                    {
                        if (_checkInput.SERIAL_NO == _input.SERIAL_NO)
                        {
                            MessageBox.Show("Have Serial_NO : " + _checkInput.SERIAL_NO + " Duplicate", "Stop", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                            this.txtSerial.Clear();
                            return;
                        }
                    }
                    _listInputTestManufacturing.Add(_input);

                    this.tableInputTest.Rows.Add(
                        _input.Order.FFT_ORDER_ID,
                        _input.SERIAL_NO,
                        _input.Order.GROUP,
                        _input.Order.PURCHASR.FLOW.FLOW_NAME,
                        _input.INPUT_DATE
                        );

                    this.dgvInputRMA.DataSource = this.tableInputTest;

                    this.txtTotalQty.Text = Convert.ToString(_listInputTestManufacturing.Count());
                    this.txtHistory.Text  = Convert.ToString(HistoryCount + _listInputTestManufacturing.Count());

                    this.txtSerial.Clear();
                }
                else
                {
                    MessageBox.Show("Please input Serial_NO", "Stop", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                }
            }
        }
Ejemplo n.º 7
0
    IEnumerator <float> StartToggle(InputProperty _inputProperty)
    {
        yield return(Timing.WaitForOneFrame);

        while (brain.IsLive(enterCamera))
        {
            yield return(Timing.WaitForOneFrame);

            if (_inputProperty.GetInputDown())
            {
                break;
            }
        }
        DeactivateSwitchObjects();
        ExitCamera();
    }
Ejemplo n.º 8
0
        public Vector3 Position()
        {
            InputProperty prop = GetPropertyByName("position");

            if (prop == null)
            {
                return(Vector3.Zero);
            }

            string[] values = prop.Value.Split(',');
            if (values.Length != 3)
            {
                return(Vector3.Zero);
            }

            return(new Vector3(float.Parse(values[0]), float.Parse(values[1]), float.Parse(values[2])));
        }
Ejemplo n.º 9
0
        public PurchaseOrderProperty SearchSerialUpdatePO(InputProperty dataItem)
        {
            PurchaseOrderProperty _result = new PurchaseOrderProperty();

            try
            {
                _resultData = _models.SearchSerialUpdatePO(dataItem);
                if (_resultData.StatusOnDb == true)
                {
                    if (_resultData.ResultOnDb.Rows.Count > 0)
                    {
                        _result.Serial = new SerialProperty
                        {
                            ID     = _resultData.ResultOnDb.Rows[0]["ID_SERIAL"].ToString(),
                            SERIAL = _resultData.ResultOnDb.Rows[0]["SERIAL"].ToString()
                        };
                        _result.Order = new OrderProperty
                        {
                            FFT_ORDER_ID = _resultData.ResultOnDb.Rows[0]["FFT_ORDER_ID"].ToString(),
                            GROUP        = _resultData.ResultOnDb.Rows[0]["GROUP"].ToString()
                        };
                        _result.Flow = new FlowProperty
                        {
                            ID = _resultData.ResultOnDb.Rows[0]["FLOW_ID"].ToString(),
                        };
                        _result.Input = new InputtypeProperty
                        {
                            ORDER_TYPE_NAME = _resultData.ResultOnDb.Rows[0]["INPUT_TYPE"].ToString()
                        };
                        _result.PO = _resultData.ResultOnDb.Rows[0]["PO"].ToString();
                    }
                }
                else
                {
                    MessageBox.Show(_resultData.MessageOnDb, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                return(_result);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return(_result);
            }
        }
Ejemplo n.º 10
0
 get => (Brush)GetValue(InputProperty); set => SetValue(InputProperty, value);
Ejemplo n.º 11
0
 public OutputOnDbProperty SearchSerialUpdatePO(InputProperty dataItem)
 {
     _resultData = _services.SearchSerialUpdatePO(dataItem);
     return(_resultData);
 }
Ejemplo n.º 12
0
 void Hold(InputProperty _inputProperty)
 {
     StopSwitchRoutines();
     switchCoroutine = Timing.RunCoroutine(StartHold(_inputProperty));
 }
Ejemplo n.º 13
0
 public OutputOnDbProperty SearchSerialUpdatePO(InputProperty dataItem)
 {
     sql        = _sqlFactoryPO.SearchSerialUpdatePO(dataItem);
     resultData = base.SearchBySql(sql);
     return(resultData);
 }
Ejemplo n.º 14
0
 set => this.SetValue(InputProperty, value);
Ejemplo n.º 15
0
        /// <summary>
        /// Creates an update view. If an IUpdateViewVisitor sets an InputProperty to null,
        /// then that property will not be rendered in the view.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="model">The model used to generate the view</param>
        /// <param name="viewVisitors"></param>
        /// <returns></returns>
        public UpdateView BuildUpdateView <T>(T model, params IUpdateViewVisitor[] viewVisitors) where T : class, IIdentifiable, INameable
        {
            if (model == null)
            {
                throw new InvalidOperationException("Model cannot be null");
            }

            var modelType  = typeof(T);
            var modelName  = modelType.Name;
            var isUpdate   = model.Id > 0;
            var pluralName = _pluralizer.Pluralize(modelName);

            var view = new UpdateView
            {
                Title = isUpdate
                    ? (model.Name ?? modelName)
                    : string.Format("Create new {0}", modelName),
                Form = new Routeable
                {
                    Html        = new AttributeDictionary(new { @class = "pure-form pure-form-aligned" }),
                    RouteName   = isUpdate ? "Details" : "Default",
                    RouteValues = new AttributeDictionary(new
                    {
                        controller = pluralName,
                        action     = "Update",
                    }),
                    FormMethod = FormMethod.Post
                }
            };

            if (isUpdate)
            {
                view.Form.RouteValues["id"] = model.Id;
            }

            var saveButton = new ActionModel
            {
                Type = ActionType.Button,
                Html = new AttributeDictionary(new
                {
                    id     = "saveButton",
                    @class = "pure-button pure-button-primary",
                    title  = "Save"
                })
            };

            saveButton.IconHtmlClasses.Add("fa fa-floppy-o fa-lg");

            view.ContextItems.Add(saveButton);

            var cancelButton = new ActionModel
            {
                Type = ActionType.Link,
                Html = new AttributeDictionary(new
                {
                    @class = "pure-button",
                    title  = "Cancel"
                }),
                RouteName   = "Default",
                RouteValues = new AttributeDictionary(new
                {
                    controller = pluralName,
                    action     = "Index"
                })
            };

            cancelButton.IconHtmlClasses.Add("fa fa-times fa-lg");

            view.ContextItems.Add(cancelButton);

            var updateProperties = typeof(T).GetUpdateProperties();

            foreach (var propertyInfo in updateProperties)
            {
                var updatableAttribute = (propertyInfo.GetCustomAttributes(typeof(ViewUpdatablePropertyAttribute), false)
                                          as IEnumerable <ViewUpdatablePropertyAttribute>).Single();
                var required  = (propertyInfo.GetCustomAttributes(typeof(RequiredAttribute), false) as RequiredAttribute[]).SingleOrDefault();
                var labelText = GetPropertyName(propertyInfo);
                if (required != null)
                {
                    labelText += " *";
                }

                var inputProperty = new InputProperty
                {
                    Label     = labelText,
                    Type      = updatableAttribute.InputPropertyType,
                    ModelName = propertyInfo.Name,
                    Source    = model
                };

                if (viewVisitors != null && viewVisitors.Length > 0)
                {
                    InputProperty visited = null;

                    foreach (var visitor in viewVisitors)
                    {
                        visited = visitor.Visit(inputProperty);
                    }

                    if (visited == null)
                    {
                        continue;
                    }
                }

                var value = propertyInfo.GetValue(model, null);

                var complexAttribute = (propertyInfo.GetCustomAttributes(typeof(ViewComplexPropertyAttribute), false)
                                        as IEnumerable <ViewComplexPropertyAttribute>).SingleOrDefault();

                if (complexAttribute != null)
                {
                    var repositoryGetMethod = _repositoryFactory.GetType().GetMethod("Get");

                    if (propertyInfo.PropertyType.GetInterfaces().Contains(typeof(IEnumerable)) &&
                        propertyInfo.PropertyType.IsGenericType)
                    {
                        var genericGetMethod = repositoryGetMethod.MakeGenericMethod(propertyInfo.PropertyType.GetGenericArguments()[0]);
                        var repository       = genericGetMethod.Invoke(_repositoryFactory, null);
                        var selections       = repository.GetType().GetMethod("All").Invoke(repository, new object[] { null }) as IEnumerable;
                        var selectedValues   = value != null
                            ? (value as IEnumerable).OfType <object>().Select(o =>
                                                                              o.GetType()
                                                                              .GetProperty(complexAttribute.ValuePropertyName)
                                                                              .GetValue(o, null))
                            : null;

                        inputProperty.Value = new MultiSelectList(selections,
                                                                  complexAttribute.ValuePropertyName,
                                                                  complexAttribute.LabelPropertyName,
                                                                  selectedValues);
                    }
                    else
                    {
                        var complexPropertyInfo = propertyInfo;
                        var foreignKeyAttribute = (propertyInfo.GetCustomAttributes(typeof(ViewComplexPropertyForeignKeyAttribute), false)
                                                   as ViewComplexPropertyForeignKeyAttribute[]).SingleOrDefault();

                        if (foreignKeyAttribute != null)
                        {
                            complexPropertyInfo = model.GetType().GetProperty(foreignKeyAttribute.ForPropertyName);
                            value = complexPropertyInfo.GetValue(model, null);
                        }

                        var genericGetMethod = repositoryGetMethod.MakeGenericMethod(complexPropertyInfo.PropertyType);
                        var repository       = genericGetMethod.Invoke(_repositoryFactory, null);
                        var selections       = repository.GetType().GetMethod("All").Invoke(repository, new object[] { null }) as IEnumerable;
                        var selectedValues   = value != null
                            ? value.GetType().GetProperty(complexAttribute.ValuePropertyName).GetValue(value, null)
                            : null;

                        if (required == null)
                        {
                            selections = new List <object> {
                                null
                            }
                        }
Ejemplo n.º 16
0
 /// <summary>
 /// ボタンのプロパティ設定
 /// </summary>
 private static void ButtonProperty(string name, float gravity, float dead, float sensitivity, int index)
 {
     name += "Button_";
     InputManagerSetter.ims.AddInputProperty(InputProperty.CreateGamePadProperty(name + "X", gravity, dead, sensitivity, false, false, 6, index));
     InputManagerSetter.ims.AddInputProperty(InputProperty.CreateGamePadProperty(name + "Y", gravity, dead, sensitivity, false, false, 7, index));
 }
Ejemplo n.º 17
0
 /// <summary>
 /// トリガーのプロパティ設定
 /// </summary>
 private static void TriggerProperty(string name, float gravity, float dead, float sensitivity, int index)
 {
     InputManagerSetter.ims.AddInputProperty(InputProperty.CreateGamePadProperty(name + "LT", dead, gravity, sensitivity, false, false, 3, index));
     InputManagerSetter.ims.AddInputProperty(InputProperty.CreateGamePadProperty(name + "RT", dead, gravity, sensitivity, false, false, 3, index));
 }
Ejemplo n.º 18
0
 /// <summary>
 /// アナログスティックのYプロパティ設定
 /// </summary>
 private static void R_StickProperty(string name, float gravity, float dead, float sensitivity, bool invert, int index)
 {
     name += "JoyStick_Y";
     InputManagerSetter.ims.AddInputProperty(InputProperty.CreateGamePadProperty("L" + name, gravity, dead, sensitivity, false, invert, 2, index));
     InputManagerSetter.ims.AddInputProperty(InputProperty.CreateGamePadProperty("R" + name, gravity, dead, sensitivity, false, invert, 5, index));
 }
Ejemplo n.º 19
0
 set => SetValue(InputProperty, value);
Ejemplo n.º 20
0
 void Toggle(InputProperty _inputProperty)
 {
     StopSwitchRoutines();
     switchCoroutine = Timing.RunCoroutine(StartToggle(_inputProperty));
 }