Пример #1
0
        private void DoSave()
        {
            wsINP.IwsINPClient client = new wsINP.IwsINPClient();
            try
            {
                baseForm.SetCursor();
                baseForm.ValidateData(this);
                if (dtlDt.Rows.Count > 0)
                {
                    tinpwip wip = GetSingleWip();
                    if ((Convert.ToDecimal(dtlDt.Rows[0]["pairqty"]) - this.numPairQty.Value) > wip.pairqty)
                    {
                        throw new Exception(UtilCulture.GetString("Msg.R01027"));
                    }

                    client.DoSupplementAdjust(baseForm.CurrentContextInfo, dtlDt.Rows[0]["supldtlsysid"].ToString(), Convert.ToInt16(this.numPairQty.Value), this.ckTwiceInspect.Checked ? MES_Misc.Y.ToString() : MES_Misc.N.ToString());

                    baseForm.CreateMessageBox(Public_MessageBox.Information, MessageBoxButtons.OK, null, UtilCulture.GetString("Msg.R00002"));
                    this.Close();
                }
                else
                {
                    throw new Exception("No data found");
                }

            }
            catch (Exception ex)
            {
                baseForm.CreateMessageBox(Public_MessageBox.Error, MessageBoxButtons.OK, null, ex.Message);
            }
            finally
            {
                baseForm.ResetCursor();
            }
        }