private void sprPPEList_Change(object eventSender, Stubs._FarPoint.Win.Spread.ChangeEventArgs eventArgs)
        {
            int Col        = eventArgs.Column;
            int Row        = eventArgs.Row;
            int CellHeight = 0;

            if (Col == 1)
            {
                ViewModel.sprPPEList.Row = Row;
                ViewModel.sprPPEList.Col = Col;
                if (modGlobal.Clean(ViewModel.sprPPEList.Text) != "")
                {
                    ViewModel.sprPPEList.Col = 8;
                    if (modGlobal.Clean(ViewModel.sprPPEList.Text) != "")
                    {
                        //UPGRADE_WARNING: (1068) GetVal() of type Variant is being forced to int. More Information: http://www.vbtonet.com/ewis/ewi1068.aspx
                        ViewModel.iUniformID = Convert.ToInt32(modGlobal.GetVal(ViewModel.sprPPEList.Text));
                    }
                    else
                    {
                        ViewModel.sprPPEList.Col     = 1;
                        ViewModel.iUniformID         = 0;
                        ViewModel.UniformDescription = modGlobal.Clean(ViewModel.sprPPEList.Text);
                        FindUniformID();
                        if (ViewModel.iUniformID == 0)
                        {
                            return;
                        }
                        else
                        {
                            ViewModel.sprPPEList.Col  = 8;
                            ViewModel.sprPPEList.Text = ViewModel.iUniformID.ToString();
                        }
                    }
                    ViewModel.OKButton.Enabled = true;
                }
            }

            if (Col == 3)
            {
                ViewModel.sprPPEList.Row = Row;
                ViewModel.sprPPEList.Col = Col;
                if (modGlobal.Clean(ViewModel.sprPPEList.Text) != "")
                {
                    if (!Information.IsDate(ViewModel.sprPPEList.Text))
                    {
                        ViewManager.ShowMessage("Date In is not a valid date.  Must be in m/d/yyyy format.", "Invalid Date Error", UpgradeHelpers.Helpers.BoxButtons.OK);
                    }
                }
            }

            if (Col == 4)
            {
                ViewModel.sprPPEList.Row = Row;
                ViewModel.sprPPEList.Col = Col;
                if (modGlobal.Clean(ViewModel.sprPPEList.Text) != "")
                {
                    if (!Information.IsDate(ViewModel.sprPPEList.Text))
                    {
                        ViewManager.ShowMessage("Date Out is not a valid date.  Must be in m/d/yyyy format.", "Invalid Date Error", UpgradeHelpers.Helpers.BoxButtons.OK);
                    }
                }
            }

            if (Col == 5)
            {
                ViewModel.sprPPEList.Row               = Row;
                ViewModel.sprPPEList.Col               = Col;
                ViewModel.sprPPEList.CellType          = FarPoint.ViewModels.Cells.FpCellType.CellTypeEdit;
                ViewModel.sprPPEList.TypeEditMultiLine = true;
                //UPGRADE_ISSUE: (2064) FPSpreadADO.fpSpread property sprPPEList.MaxTextCellHeight was not upgraded. More Information: http://www.vbtonet.com/ewis/ewi2064.aspx
                CellHeight = Convert.ToInt32(ViewModel.sprPPEList.getMaxTextCellHeight());
                ViewModel.sprPPEList.SetRowHeight(Row, CellHeight);
            }
        }
示例#2
0
        private void sprPPEList_Change(object eventSender, Stubs._FarPoint.Win.Spread.ChangeEventArgs eventArgs)
        {
            int Col        = eventArgs.Column;
            int Row        = eventArgs.Row;
            int CellHeight = 0;

            if (Col == 1)
            {
                ViewModel.sprPPEList.Row = Row;
                ViewModel.sprPPEList.Col = Col;
                if (modGlobal.Clean(ViewModel.sprPPEList.Text) != "")
                {
                    ViewModel.sprPPEList.Col = 7;
                    if (modGlobal.Clean(ViewModel.sprPPEList.Text) != "")
                    {
                        //UPGRADE_WARNING: (1068) GetVal() of type Variant is being forced to int. More Information: http://www.vbtonet.com/ewis/ewi1068.aspx
                        ViewModel.iUniformID = Convert.ToInt32(modGlobal.GetVal(ViewModel.sprPPEList.Text));
                    }
                    else
                    {
                        ViewModel.sprPPEList.Col     = 1;
                        ViewModel.iUniformID         = 0;
                        ViewModel.UniformDescription = modGlobal.Clean(ViewModel.sprPPEList.Text);
                        FindUniformID();
                        if (ViewModel.iUniformID == 0)
                        {
                            return;
                        }
                        else
                        {
                            ViewModel.sprPPEList.Col  = 7;
                            ViewModel.sprPPEList.Text = ViewModel.iUniformID.ToString();
                        }
                    }
                    ViewModel.OKButton.Enabled = true;
                }
            }

            if (Col == 2)
            {
                ViewModel.sprPPEList.Row = Row;
                ViewModel.sprPPEList.Col = Col;
                if (UpgradeHelpers.Helpers.StringsHelper.ToDoubleSafe(Convert.ToString(ViewModel.sprPPEList.Value)) == 1)
                {
                    //UPGRADE_ISSUE: (2064) FPSpreadADO.fpSpread property sprPPEList.TypeCheckText was not upgraded. More Information: http://www.vbtonet.com/ewis/ewi2064.aspx
                    ViewModel.sprPPEList.setTypeCheckText(DateTime.Now.ToString("M/d/yyyy"));
                }
                else
                {
                    //UPGRADE_ISSUE: (2064) FPSpreadADO.fpSpread property sprPPEList.TypeCheckText was not upgraded. More Information: http://www.vbtonet.com/ewis/ewi2064.aspx
                    ViewModel.sprPPEList.setTypeCheckText("");
                }
            }

            if (Col == 3)
            {
                ViewModel.sprPPEList.Row = Row;
                ViewModel.sprPPEList.Col = Col;
                if (UpgradeHelpers.Helpers.StringsHelper.ToDoubleSafe(Convert.ToString(ViewModel.sprPPEList.Value)) == 1)
                {
                    //UPGRADE_ISSUE: (2064) FPSpreadADO.fpSpread property sprPPEList.TypeCheckText was not upgraded. More Information: http://www.vbtonet.com/ewis/ewi2064.aspx
                    ViewModel.sprPPEList.setTypeCheckText(DateTime.Now.ToString("M/d/yyyy"));
                }
                else
                {
                    //UPGRADE_ISSUE: (2064) FPSpreadADO.fpSpread property sprPPEList.TypeCheckText was not upgraded. More Information: http://www.vbtonet.com/ewis/ewi2064.aspx
                    ViewModel.sprPPEList.setTypeCheckText("");
                }
            }

            if (Col == 4)
            {
                ViewModel.sprPPEList.Row               = Row;
                ViewModel.sprPPEList.Col               = Col;
                ViewModel.sprPPEList.CellType          = FarPoint.ViewModels.Cells.FpCellType.CellTypeEdit;
                ViewModel.sprPPEList.TypeEditMultiLine = true;
                //UPGRADE_ISSUE: (2064) FPSpreadADO.fpSpread property sprPPEList.MaxTextCellHeight was not upgraded. More Information: http://www.vbtonet.com/ewis/ewi2064.aspx
                CellHeight = Convert.ToInt32(ViewModel.sprPPEList.getMaxTextCellHeight());
                ViewModel.sprPPEList.SetRowHeight(Row, CellHeight);
            }
        }