Пример #1
0
 private static void FixAnestheticNotes(AriClinicContext ctx)
 {
     foreach (AnestheticServiceNote asn in ctx.AnestheticServiceNotes)
     {
         CntAriCli.CheckAnestheticServiceNoteTickets(asn, ctx);
     }
 }
Пример #2
0
    protected bool UpdateRelatedTickets(AnestheticServiceNote asn, IList <SaveCheck> lschk)
    {
        try
        {
            ctx.Delete(asn.AnestheticTickets);
            asn.AnestheticTickets.Clear();
            CntAriCli.CheckAnestheticServiceNoteTickets(asn, ctx, lschk);
            if (firstTime)
            {
                firstTime = false;
                Response.Redirect(String.Format("AnestheticServiceNoteForm.aspx?AnestheticServiceNoteId={0}", asn.AnestheticServiceNoteId));
            }
        }
        catch (AriCliException ex)
        {
            string message = "";
            switch (ex.Number)
            {
            case 1:
                message = Resources.GeneralResource.NoPrimaryPolicy;
                break;

            case 2:
                message = Resources.GeneralResource.NoPainPump;
                break;

            case 3:
                message = Resources.GeneralResource.NoNomenclatorService;
                break;

            default:
                message = ex.Message;
                break;
            }
            string command = String.Format("showDialog('{0}','{1}','warning',null,0,0);"
                                           , Resources.GeneralResource.Warning
                                           , message);
            RadAjaxManager1.ResponseScripts.Add(command);
            Session["LinkId"] = asn.AnestheticServiceNoteId;
            return(false);
        }
        return(true);
    }