Пример #1
0
        private void tsbApprove_Click(object sender, EventArgs e)
        {
            string             username = User.CurrentUser != null ? User.CurrentUser.ParamName : string.Empty;
            UsageDecisionsForm form     = new UsageDecisionsForm();

            if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                var ud = form.UsageDecisionResult;
                if (ud == null)
                {
                    return;
                }
                ReturnValue rv = CheckOrder.UpdateSampleOrderState(_sampleOrder.SampleID, username, CheckOrderStateEnum.Approve, ud.ParamID);

                if (rv.Success)
                {
                    _sampleOrder.UsageDecisions  = ud.ParamID;
                    _sampleOrder.CheckOrderState = CheckOrderStateEnum.Approve;
                    _sampleOrder.Auditor         = username;
                    SetOrderState();
                }
                ReturnValue.ShowMessage(rv);
                this.Close();
            }
        }