예제 #1
0
        private void microAvailYes_CheckedChanged(object sender, EventArgs e)
        {
            RadioButton oRb = sender as RadioButton;

            if (oRb != null && formloaded)
            {
                if (oRb.Checked)
                {
                    var ErrorM = core.returnMessage(MandSelected, true, MandatoryFields);

                    if (!string.IsNullOrEmpty(ErrorM))
                    {
                        MessageBox.Show(ErrorM);
                    }
                    else
                    {
                        TLSPN_CottonTransactions cotTrans = new TLSPN_CottonTransactions();
                        cotTrans.cotrx_LotNo              = Convert.ToInt32(txtLotNo.Text);
                        cotTrans.cotrx_Return_No          = Convert.ToInt32(txtGrnNumber.Text);
                        cotTrans.cotrx_GrossAveBaleWeight = Convert.ToDecimal(txtGrossAvgBaleWeight.Text);
                        cotTrans.cottrx_NettAveBaleWeight = Convert.ToDecimal(txtNetAvgBaleWeight.Text);
                        cotTrans.cotrx_NoBales            = Convert.ToInt32(txtNoOfBales.Text);
                        frmCottonBales cb = new frmCottonBales(cotTrans);
                        cb.ShowDialog(this);
                    }
                }
            }
        }
예제 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Button oBtn = sender as Button;

            if (oBtn != null && formloaded)
            {
                var ErrorM = core.returnMessage(MandSelected, true, MandatoryFields);

                if (!string.IsNullOrEmpty(ErrorM))
                {
                    MessageBox.Show(ErrorM);
                    return;
                }


                TLSPN_CottonTransactions cotTrans = new TLSPN_CottonTransactions();
                frmCottonBales           cb       = new frmCottonBales(cotTrans);
                cb.ShowDialog(this);
            }
        }