예제 #1
0
        public static string CheckRecord(String recordId)
        {
            try
            {
                RecordStorage rs = new RecordStorage();
                Record record = rs.GetRecord(Guid.Parse(recordId));
                RecordService s = new RecordService(record);
                s.Approve();
            }
            catch (Exception ex)
            {
                if (ex.Message.Contains("This license is invalid"))
                    return new MessageBox("Record approved successfully", new Button("Ok", new Call("ViewData", new string[] { recordId }))).UmGo();
                else
                    return new MessageBox("Error to approved this record", new Button("Close")).UmGo("Warning");
            }

            return new MessageBox("Record approved successfully", new Button("Ok", new Call("ViewData", new string[] { recordId })))
                .UmGo();
        }