private void InitializeComponent()
 {
     this.numBox = new MobGE.MobControl.MobNumEdit();
     this.button = new MobGE.MobControl.MobButton();
     this.SuspendLayout();
     //
     // numBox
     //
     this.numBox.Dock       = System.Windows.Forms.DockStyle.Fill;
     this.numBox.DSColumn   = "";
     this.numBox.DSProperty = "Value";
     this.numBox.DSSubTable = "";
     this.numBox.DSTable    = "";
     this.numBox.Increment  = 0;
     this.numBox.Location   = new System.Drawing.Point(0, 0);
     this.numBox.Maximum    = 0;
     this.numBox.MaxLength  = 0;
     this.numBox.Minimum    = 0;
     this.numBox.Name       = "numBox";
     this.numBox.Size       = new System.Drawing.Size(133, 21);
     this.numBox.TabIndex   = 3;
     this.numBox.Value      = 0;
     //
     // button
     //
     this.button.Dock     = System.Windows.Forms.DockStyle.Right;
     this.button.Location = new System.Drawing.Point(133, 0);
     this.button.Name     = "button";
     this.button.Size     = new System.Drawing.Size(25, 49);
     this.button.TabIndex = 2;
     this.button.Text     = "...";
     this.button.Click   += new System.EventHandler(this.button_Click);
     //
     // MobNumEditButton
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Dpi;
     this.Controls.Add(this.numBox);
     this.Controls.Add(this.button);
     this.Name    = "MobNumEditButton";
     this.Size    = new System.Drawing.Size(158, 49);
     this.Resize += new System.EventHandler(this.MobTextBoxButton_Resize);
     this.ResumeLayout(false);
 }
Example #2
0
        public virtual void reinitEditingForData()
        {
            _checkLevel = handler.stockLevelControl;

            cPanelUnit.Visible                  =
                cPanelTotal.Visible             =
                    cPanelDiscount.Visible      =
                        cPanelAmount.Visible    =
                            cPanelPrice.Visible = false;

            _tableSchema.Clear();

            cTotal.Value             =
                cDiscount.Value      =
                    cAmount.Value    =
                        cPrice.Value = 0.0;



            MobNumEdit numEdit = null;

            switch (handler.converCol(handler.column))
            {
            case TableSTLINE.AMOUNT:
                cPanelUnit.Visible   = true;
                cPanelAmount.Visible = true;
                numEdit = cAmount;

                break;

            case TableSTLINE.PRICE:
                cPanelUnit.Visible  = true;
                cPanelPrice.Visible = true;
                numEdit             = cPrice;

                break;

            case TableSTLINE.TOTAL:
                cPanelTotal.Visible = true;
                numEdit             = cTotal;

                break;

            case TableSTLINE.DISCPER:
                cPanelDiscount.Visible = true;
                numEdit = cDiscount;

                break;

            default:
                return;
            }

            cNumInput.setNumEdit(numEdit);
            numEdit.RequestFocus();


            object cancelState = handler.row[TableSTLINE.CANCELLED];

            try
            {
                handler.row[TableSTLINE.CANCELLED] = ConstBool.yes;
                fillSchema(handler.row);
                refreshReport();
            }
            finally
            {
                ToolCell.set(handler.row, TableSTLINE.CANCELLED, cancelState);
            }


            cBtnUnit.Click += cBtnUnit_Click;
        }