示例#1
0
        public CreateCallForPapersViewModel(bool modelState, CallForPapers callforpaper, CallForPaperService service)
        {
            if (modelState)
            {
                try
                {
                    Status = CheckEntity(service, callforpaper);
                }
                catch (InternetException ex)
                {
                    Message = ex.Message;
                    Status  = false;
                    return;
                }
                catch (DatabaseException ex)
                {
                    Message = ex.Message;
                    Status  = false;
                    return;
                }

                Message = " Registration successful!\n";
                Status  = true;
            }
            else
            {
                Message = " Invalid request!\n";
                Status  = false;
            }
        }
示例#2
0
        public DetailsCallForPapersViewModel(bool isValid, CallForPapers callforpaper, CallForPaperService service)
        {
            if (isValid)
            {
                try
                {
                    Status = CheckEntity(service, callforpaper);
                }
                catch (InternetException ex)
                {
                    Message = ex.Message;
                    Status  = false;
                    return;
                }
                catch (DatabaseException ex)
                {
                    Message = ex.Message;
                    Status  = false;
                    return;
                }

                Message = " Delete successful!\n";
                Status  = true;
            }
            else
            {
                Message = " Invalid request!\n";
                Status  = false;
            }
        }
示例#3
0
 public CallForPapersController()
 {
     CallForPaperService = new CallForPaperService(new CallForPapersRepository());
 }