Example #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            var po = _iqcService.GetPackingPoModelAndPoNo(lblModelID.Text, txtPO.Text);

            if (po != null)
            {
                try
                {
                    _iqcService.UpdatePo(lblModelID.Text, txtPO.Text, int.Parse(txtQtyPO.EditValue.ToString()), null);
                    Close();
                }
                catch (Exception ex)
                {
                    MessageBoxHelper.ShowMessageBoxError(ex.Message);
                }
            }
            else
            {
                try
                {
                    _iqcService.InsertPo(lblModelID.Text, txtPO.Text, int.Parse(txtQtyPO.EditValue.ToString()), null);
                    Close();
                }
                catch (Exception ex)
                {
                    MessageBoxHelper.ShowMessageBoxError(ex.Message);
                }
            }
        }