private void btnSelfMake_Click(object sender, EventArgs e)
        {
            FormSelfMake from = new FormSelfMake();

            StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            if (from.ShowDialog() != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            if (from.fish.code != null && from.fish.code.ToString() != "")
            {
                txtFishmealId.Text         = from.fish.code;
                txtProtein.Text            = from.fish.domestic_protein.ToString();
                txtTVN.Text                = from.fish.domestic_tvn.ToString();
                txtHistamine.Text          = from.fish.domestic_amine.ToString();
                txtUnit.Text               = from.fish.domestic_sour.ToString();
                txtBillOfLadingNumber.Text = from.fish.billofgoods;
                txtNameOfTheShip.Text      = from.fish.shipno;
            }
            else
            {
                MessageBox.Show("鱼粉不能为空!");
            }
        }
Exemple #2
0
        private void buttom_Click(object sender, EventArgs e)
        {
            UIControls.ButtonEx currentBtn = sender as UIControls.ButtonEx;
            if (currentBtn == null)
            {
                return;
            }

            currentBtn.Image = ImageUtil.ButtomLeftImageSelected;

            foreach (UILibrary.PushPanel.PushPanelItem item in pushPanel1.Items)
            {
                foreach (Control ctl in item.Controls)
                {
                    UILibrary.SkinButtom btn = ctl as UILibrary.SkinButtom;
                    if (btn == null)
                    {
                        continue;
                    }
                    if (btn.Equals(currentBtn))
                    {
                        continue;
                    }
                    btn.Image = ImageUtil.ButtonLeftImageNormal;
                }
            }


            if (currentBtn.Form == null)
            {
                return;
            }

            if (currentBtn.Form is FormFish)
            {
                FormFish form = currentBtn.Form as FormFish;
                form.ClickGBEvent += form_ClickGBEvent;
            }
            else if (currentBtn.Form is FormQuote)
            {
                FormQuote form = currentBtn.Form as FormQuote;
                form.ClickFishEvent += form_ClickFishEvent;
            }
            else if (currentBtn.Form is FormConfirm)
            {
                FormConfirm form = currentBtn.Form as FormConfirm;
                form.ClickFishEvent += form_ClickFishEvent;
            }
            else if (currentBtn.Form is FormSpot)
            {
                FormSpot form = currentBtn.Form as FormSpot;
                form.ClickFishEvent += form_ClickFishEvent;
            }
            else if (currentBtn.Form is FormSelfSale)
            {
                FormSelfSale form = currentBtn.Form as FormSelfSale;
                form.ClickFishEvent += form_ClickFishEvent;
            }
            else if (currentBtn.Form is FormSelfMake)
            {
                FormSelfMake form = currentBtn.Form as FormSelfMake;
                form.ClickFishEvent += form_ClickFishEvent;
            }
            else if (currentBtn.Form is FormRemindMessage)
            {
                FormRemindMessage form = currentBtn.Form as FormRemindMessage;
                form.ClickRemindEvent += form_ClickRemindEvent;
            }
            ///父窗口
            //currentBtn.Form.MdiParent = this;
            currentBtn.Form.Show();
            currentBtn.Form.BringToFront();
        }