Beispiel #1
0
 protected override bool CheckAccessCore(OperationContext operationContext)
 {
     try
     {
         string userName;
         string password;
         string bankName;
         var    authHeader = WebOperationContext.Current.IncomingRequest.Headers["Authorization"];
         if ((authHeader != null) && (authHeader != string.Empty))
         {
             var svcCredentials = System.Text.ASCIIEncoding.ASCII
                                  .GetString(Convert.FromBase64String(authHeader.Substring(6)))
                                  .Split(':');
             userName = svcCredentials[0];
             password = svcCredentials[1];
             bankName = svcCredentials[2];
             BusinessAccessLayer.BALLogin.BALLogin bALLogin        = new BusinessAccessLayer.BALLogin.BALLogin();
             BusinessObjects.Models.User           userInformation = bALLogin.UserCheck(userName, password, bankName);
             return(userInformation == null ? false : true);
         }
         else
         {
             WebOperationContext.Current.OutgoingResponse.Headers.Add("WWW-Authenticate: Basic realm=\"MyWCFService\"");
             throw new WebFaultException(HttpStatusCode.Unauthorized);
         }
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(false);
     }
 }
Beispiel #2
0
 public List <T> selectButtonsbyScreenId <T>(int pScreenId, BusinessObjects.Models.btnType btnType)
 {
     try
     {
         List <T>            lstButtons   = new List <T>();
         string              pquery       = "SELECT * FROM tbl" + btnType.ToString() + "Button where screenId = @screenId";
         List <SqlParameter> screenParams = new List <SqlParameter>();
         screenParams.Add(new SqlParameter("@screenId", pScreenId));
         DALDBHelper.DALDBHelper dBHelper = new DALDBHelper.DALDBHelper();
         DataSet dataSet = dBHelper.executeAdapter(pquery, screenParams);
         foreach (DataRow dataRow in dataSet.Tables[0].Rows)
         {
             if (btnType == BusinessObjects.Models.btnType.ShowMessage)
             {
                 var btn = new BusinessObjects.Models.ShowMessageButton(Convert.ToInt32(dataRow["id"]), dataRow["enName"].ToString(), dataRow["arName"].ToString(),
                                                                        dataRow["messageAR"].ToString(), dataRow["messageEN"].ToString(), Convert.ToInt32(dataRow["screenId"]));
                 lstButtons.Add((T)(object)btn);
             }
             else
             {
                 var btn = new BusinessObjects.Models.IssueTicketButton(Convert.ToInt32(dataRow["id"]), dataRow["enName"].ToString(), dataRow["arName"].ToString(),
                                                                        Convert.ToInt32(dataRow["serviceId"]), Convert.ToInt32(dataRow["screenId"]));
                 lstButtons.Add((T)(object)btn);
             }
         }
         return(lstButtons);
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveExceptionToLogFile(ex);
         return(null);
     }
 }
 public sqlResultsEnum deleteAllocateCounterService(int allocateId, int counterId, int bankId)
 {
     try
     {
         string storedProc = string.Empty;
         storedProc = "delete from tblAllocateCounterService OUTPUT DELETED.IDENTITYCOL where id = @id and counterId = @counterId and bankId = @bankId";
         List <SqlParameter> allocateParams = new List <SqlParameter>();
         allocateParams.Add(new SqlParameter("@id", allocateId));
         allocateParams.Add(new SqlParameter("@bankId", bankId));
         allocateParams.Add(new SqlParameter("@counterId", counterId));
         DALDBHelper.DALDBHelper dBHelper = new DALDBHelper.DALDBHelper();
         int returnValue = Convert.ToInt32(dBHelper.executeScalar(storedProc, allocateParams));
         if ((sqlResultsEnum)returnValue == sqlResultsEnum.failed)
         {
             return(sqlResultsEnum.failed);
         }
         else
         {
             return(sqlResultsEnum.success);
         }
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(sqlResultsEnum.failed);
     }
 }
 public ActionResult Add(BusinessObjects.Models.Service service)
 {
     try
     {
         if (ModelState.IsValid)
         {
             service.bankId = ((BusinessObjects.Models.User)Session["UserObj"]).bankId;
             BusinessAccessLayer.BALService.BALService bALServices   = new BusinessAccessLayer.BALService.BALService();
             BusinessObjects.Models.ResultsEnum        checkInserted = bALServices.insertService(service);
             if (checkInserted == BusinessObjects.Models.ResultsEnum.notInserted)
             {
                 TempData["errorMsg"] = LangText.checkConnection;
                 return(RedirectToAction("Home", "Services"));
             }
             else if (checkInserted == BusinessObjects.Models.ResultsEnum.inserted)
             {
                 return(RedirectToAction("Home", "Services"));
             }
             else
             {
                 TempData["errorMsg"] = LangText.somethingWentWrongAlert;
                 return(RedirectToAction("Home", "Services"));
             }
         }
         else
         {
             return(View());
         }
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveExceptionToLogFile(ex);
         return(View("Error"));
     }
 }
 public ActionResult Edit(int serviceId)
 {
     try
     {
         BusinessAccessLayer.BALService.BALService bALServices = new BusinessAccessLayer.BALService.BALService();
         BusinessObjects.Models.Service            service     = bALServices.selectServiceById(serviceId, ((BusinessObjects.Models.User)Session["UserObj"]).bankId);
         if (service == null)
         {
             TempData["errorMsg"] = LangText.checkConnection;
             return(RedirectToAction("Home", "Services"));
         }
         else if (service.id == 0)
         {
             TempData["errorMsg"] = LangText.somethingWentWrongAlert;
             return(RedirectToAction("Home", "Services"));
         }
         else
         {
             return(View(service));
         }
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveExceptionToLogFile(ex);
         return(View("Error"));
     }
 }
Beispiel #6
0
 public ActionResult Home()
 {
     try
     {
         if (TempData["errorMsg"] != null)
         {
             ViewBag.errorMsg     = TempData["errorMsg"];
             TempData["errorMsg"] = null;
         }
         CustomerServiceModel servicesModel = GetServices(1);
         if (servicesModel.Services == null)
         {
             TempData["errorMsg"] = LangText.checkConnection;
             return(RedirectToAction("login", "Login"));
         }
         else if (servicesModel.Services.Count == 0)
         {
             return(View(servicesModel));
         }
         else if (servicesModel.Services.FirstOrDefault().id == 0)
         {
             TempData["errorMsg"] = LangText.somethingWentWrongAlert;
             return(RedirectToAction("login", "Login"));
         }
         else
         {
             return(View(servicesModel));
         }
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(View("Error"));
     }
 }
        public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context)
        {
            try
            {
                var form = await context.Request.ReadFormAsync();

                string usernameVal = context.UserName;
                string passwordVal = context.Password;
                string bankName    = form["bankName"];
                BusinessObjects.Models.User user = UserSecurity.Login(usernameVal, passwordVal, bankName);
                if (user == null)
                {
                    context.SetError("The user name, password or bankName is incorrect.", "invalid_grant");
                    context.Rejected();
                }
                else
                {
                    var claims = new List <Claim>();
                    claims.Add(new Claim("BankId", user.bankId.ToString()));
                    claims.Add(new Claim(ClaimTypes.Name, user.userName));
                    ClaimsIdentity           oAuthClaimIdentity   = new ClaimsIdentity(claims, OAuthDefaults.AuthenticationType);
                    ClaimsIdentity           cookiesClaimIdentity = new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationType);
                    AuthenticationProperties properties           = CreateProperties(user.userName);
                    AuthenticationTicket     ticket = new AuthenticationTicket(oAuthClaimIdentity, properties);
                    context.Validated(ticket);
                    context.Request.Context.Authentication.SignIn(cookiesClaimIdentity);
                }
            }
            catch (Exception ex)
            {
                ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
            }
        }
Beispiel #8
0
 public ActionResult Edit(int serviceId)
 {
     try
     {
         BusinessAccessLayer.BALService.BALService bALServices = new BusinessAccessLayer.BALService.BALService();
         ClaimsPrincipal principal = HttpContext.User as ClaimsPrincipal;
         var             bankId    = Convert.ToInt32(principal.FindFirst("BankId").Value);
         BusinessObjects.Models.Service service = bALServices.selectServiceById(serviceId, bankId);
         if (service == null)
         {
             TempData["errorMsg"] = LangText.checkConnection;
             return(RedirectToAction("Home", "Services"));
         }
         else if (service.id == 0)
         {
             TempData["errorMsg"] = LangText.somethingWentWrongAlert;
             return(RedirectToAction("Home", "Services"));
         }
         else
         {
             service.minimumServiceTime = service.minimumServiceTime != 0 ? service.minimumServiceTime : 45;
             service.maximumServiceTime = service.maximumServiceTime != 0 ? service.maximumServiceTime : 300;
             return(View(service));
         }
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(View("Error"));
     }
 }
 public ResultsEnum insertAllocateCounterService(int serviceId, int counterId, int bankId)
 {
     try
     {
         string storedProc = "sp_insertAllocateCounterService";
         List <SqlParameter> allocateParams = new List <SqlParameter>();
         allocateParams.Add(new SqlParameter("@id", counterId));
         allocateParams.Add(new SqlParameter("@serviceId", serviceId));
         allocateParams.Add(new SqlParameter("@bankId", bankId));
         DALDBHelper.DALDBHelper dBHelper = new DALDBHelper.DALDBHelper();
         int returnValue = Convert.ToInt32(dBHelper.executeScalarProc(storedProc, allocateParams));
         if ((sqlResultsEnum)returnValue == sqlResultsEnum.failed)
         {
             return(ResultsEnum.notFound);
         }
         else
         {
             return(ResultsEnum.inserted);
         }
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(ResultsEnum.notInserted);
     }
 }
Beispiel #10
0
 public BusinessObjects.Models.Bank checkBankExist(BusinessObjects.Models.Bank pBank)
 {
     try
     {
         string pquery = "SELECT id,name FROM tblBanks WHERE name = @name";
         List <SqlParameter> bankParams = new List <SqlParameter>();
         bankParams.Add(new SqlParameter("@name", pBank.name));
         DALDBHelper.DALDBHelper dBHelper = new DALDBHelper.DALDBHelper();
         DataSet dataSet = dBHelper.executeAdapter(pquery, bankParams);
         if (dataSet != null)
         {
             if (dataSet.Tables[0].Rows.Count > 0)
             {
                 pBank.id = Convert.ToInt32(dataSet.Tables[0].Rows[0][0].ToString());
             }
             else
             {
                 pBank.id = 0;
             }
         }
         else
         {
             return(null);
         }
         return(pBank);
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(null);
     }
 }
Beispiel #11
0
 public bool checkExist(string tableName, int id)
 {
     try
     {
         string pquery = "SELECT * FROM " + tableName + " WHERE id = @id";
         List <SqlParameter> bankParams = new List <SqlParameter>();
         bankParams.Add(new SqlParameter("@id", id));
         DALDBHelper.DALDBHelper dBHelper = new DALDBHelper.DALDBHelper();
         DataSet dataSet = dBHelper.executeAdapter(pquery, bankParams);
         if (dataSet != null)
         {
             if (dataSet.Tables[0].Rows.Count > 0)
             {
                 return(true);
             }
             else
             {
                 return(false);
             }
         }
         else
         {
             return(false);
         }
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(false);
     }
 }
 public ActionResult Edit(int branchId)
 {
     try
     {
         BusinessAccessLayer.BALBranches.BALBranches bALBranches = new BusinessAccessLayer.BALBranches.BALBranches();
         ClaimsPrincipal principal            = HttpContext.User as ClaimsPrincipal;
         var             bankId               = Convert.ToInt32(principal.FindFirst("BankId").Value);
         BusinessObjects.Models.Branch branch = bALBranches.selectBranchById(branchId, bankId);
         if (branch == null)
         {
             TempData["errorMsg"] = LangText.checkConnection;
             return(RedirectToAction("Home", "Branches"));
         }
         else if (branch.id == 0)
         {
             TempData["errorMsg"] = LangText.somethingWentWrongAlert;
             return(RedirectToAction("Home", "Branches"));
         }
         else
         {
             return(View(branch));
         }
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(View("Error"));
     }
 }
Beispiel #13
0
 public BusinessObjects.Models.CustomIssueTicketAndShowMessageButtons selectIssueTicketAndShowMessageButtonsByBankName(string pBankName, int pBranchId, int pScreenId)
 {
     try
     {
         BusinessObjects.Models.CustomIssueTicketAndShowMessageButtons lstButtons = new BusinessObjects.Models.CustomIssueTicketAndShowMessageButtons();
         string pquery = "sp_selectIssueTicketAndShowMessageButtonsByBankName";
         List <SqlParameter> buttonsParams = new List <SqlParameter>();
         buttonsParams.Add(new SqlParameter("@bankName", pBankName));
         buttonsParams.Add(new SqlParameter("@branchId", pBranchId));
         buttonsParams.Add(new SqlParameter("@screenId", pScreenId));
         DALDBHelper.DALDBHelper dBHelper = new DALDBHelper.DALDBHelper();
         DataSet dataSet = dBHelper.executeAdapterProc(pquery, buttonsParams);
         if (dataSet == null)
         {
             return(null);
         }
         if (dataSet.Tables[0].Rows.Count != 0)
         {
             if (Convert.ToInt32((dataSet.Tables[0].Rows[0])["id"]) > 0)
             {
                 List <BusinessObjects.Models.CustomIssueTicketButton> lstIssueTicketButtons = new List <BusinessObjects.Models.CustomIssueTicketButton>();
                 List <BusinessObjects.Models.CustomShowMessageButton> lstShowMessageButtons = new List <BusinessObjects.Models.CustomShowMessageButton>();
                 foreach (DataRow dataRow in dataSet.Tables[0].Rows)
                 {
                     if (dataRow["type"].ToString() == "IssueTicket")
                     {
                         BusinessObjects.Models.CustomIssueTicketButton issueTicketButton = new BusinessObjects.Models.CustomIssueTicketButton();
                         issueTicketButton.id        = Convert.ToInt32(dataRow["id"]);
                         issueTicketButton.enName    = dataRow["enName"].ToString();
                         issueTicketButton.arName    = dataRow["arName"].ToString();
                         issueTicketButton.serviceId = Convert.ToInt32(dataRow["serviceId"]);
                         issueTicketButton.screenId  = Convert.ToInt32(dataRow["screenId"]);
                         lstIssueTicketButtons.Add(issueTicketButton);
                     }
                     else
                     {
                         BusinessObjects.Models.CustomShowMessageButton showMessageButton = new BusinessObjects.Models.CustomShowMessageButton();
                         showMessageButton.id        = Convert.ToInt32(dataRow["id"]);
                         showMessageButton.enName    = dataRow["enName"].ToString();
                         showMessageButton.arName    = dataRow["arName"].ToString();
                         showMessageButton.messageEN = dataRow["messageEN"].ToString();
                         showMessageButton.messageAR = dataRow["messageAR"].ToString();
                         showMessageButton.screenId  = Convert.ToInt32(dataRow["screenId"]);
                         lstShowMessageButtons.Add(showMessageButton);
                     }
                 }
                 lstButtons.issueTicketButtons = lstIssueTicketButtons;
                 lstButtons.showMessageButtons = lstShowMessageButtons;
             }
         }
         return(lstButtons);
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(null);
     }
 }
Beispiel #14
0
 public List <Service> selectServicesByBankId(int pBankId)
 {
     try
     {
         List <Service>      lstServices   = new List <Service>();
         string              pquery        = "sp_selectServicesByBankId";
         List <SqlParameter> ServiceParams = new List <SqlParameter>();
         ServiceParams.Add(new SqlParameter("@bankId", pBankId));
         DALDBHelper.DALDBHelper dBHelper = new DALDBHelper.DALDBHelper();
         DataSet dataSet = dBHelper.executeAdapterProc(pquery, ServiceParams);
         if (dataSet != null)
         {
             if (dataSet.Tables[0].Rows.Count != 0)
             {
                 if (Convert.ToInt32((dataSet.Tables[0].Rows[0])["id"]) != 0)
                 {
                     foreach (DataRow dataRow in dataSet.Tables[0].Rows)
                     {
                         Service service = new Service();
                         service.id              = Convert.ToInt32(dataRow["id"]);
                         service.enName          = dataRow["enName"].ToString();
                         service.arName          = dataRow["arName"].ToString();
                         service.active          = Convert.ToBoolean(dataRow["active"]);
                         service.maxNumOfTickets = Convert.ToInt32(dataRow["maxNumOfTickets"]);
                         if (dataRow["minimumServiceTime"] != System.DBNull.Value)
                         {
                             service.minimumServiceTime = Convert.ToInt32(dataRow["minimumServiceTime"]);
                         }
                         if (dataRow["maximumServiceTime"] != System.DBNull.Value)
                         {
                             service.maximumServiceTime = Convert.ToInt32(dataRow["maximumServiceTime"]);
                         }
                         service.bankId = Convert.ToInt32(dataRow["bankId"]);
                         lstServices.Add(service);
                     }
                 }
                 else
                 {
                     Service service = new Service();
                     service.id = 0;
                     lstServices.Add(service);
                     return(lstServices);
                 }
             }
             return(lstServices);
         }
         else
         {
             return(null);
         }
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(null);
     }
 }
Beispiel #15
0
 public Services()
 {
     try
     {
         InitializeComponent();
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
     }
 }
 public ActionResult Add()
 {
     try
     {
         return(View());
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveExceptionToLogFile(ex);
         return(View("Error"));
     }
 }
Beispiel #17
0
 public int executeNonQueryProc(string query, List <SqlParameter> parametros)
 {
     try
     {
         return(nonQueryProc(query, parametros));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveExceptionToLogFile(ex);
         return(-1);
     }
 }
 public ActionResult Add()
 {
     try
     {
         return(View());
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(View("Error"));
     }
 }
Beispiel #19
0
 public void Configuration(IAppBuilder app)
 {
     try
     {
         ConfigureAuth(app);
         ConfigureOAuth(app);
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
     }
 }
Beispiel #20
0
 public object executeScalarProc(string storedProc, List <SqlParameter> parametros)
 {
     try
     {
         return(scalarProc(storedProc, parametros));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(null);
     }
 }
Beispiel #21
0
 public object executeScalarProc(string storedProc, List <SqlParameter> parametros)
 {
     try
     {
         return(scalarProc(storedProc, parametros));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveExceptionToLogFile(ex);
         return(null);
     }
 }
Beispiel #22
0
 public int executeNonQueryProc(string query, List <SqlParameter> parametros)
 {
     try
     {
         return(nonQueryProc(query, parametros));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(-1);
     }
 }
Beispiel #23
0
 public BusinessObjects.Models.ResultsEnum updateCounter(BusinessObjects.Models.Counter counter, int bankId)
 {
     try
     {
         DataAccessLayer.DALCounter.DALCounter dALCounter = new DataAccessLayer.DALCounter.DALCounter();
         return(dALCounter.updateCounter(counter, bankId));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveExceptionToLogFile(ex);
         return(BusinessObjects.Models.ResultsEnum.notUpdated);
     }
 }
Beispiel #24
0
 public BusinessObjects.Models.Counter selectCounterById(int counterId, int bankId)
 {
     try
     {
         DataAccessLayer.DALCounter.DALCounter dALCounter = new DataAccessLayer.DALCounter.DALCounter();
         return(dALCounter.selectCounterById(counterId, bankId));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveExceptionToLogFile(ex);
         return(null);
     }
 }
Beispiel #25
0
 public List <BusinessObjects.Models.Counter> selectCountersByBranchId(int pBranchId, int pBankId)
 {
     try
     {
         DataAccessLayer.DALCounter.DALCounter dALCounter = new DataAccessLayer.DALCounter.DALCounter();
         return(dALCounter.selectCountersByBranchId(pBranchId, pBankId));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveExceptionToLogFile(ex);
         return(null);
     }
 }
Beispiel #26
0
 public BusinessObjects.Models.ResultsEnum updateBranch(BusinessObjects.Models.Branch branch)
 {
     try
     {
         DataAccessLayer.DALBranches.DALBranches dALBranches = new DataAccessLayer.DALBranches.DALBranches();
         return(dALBranches.updateBranch(branch));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(BusinessObjects.Models.ResultsEnum.notUpdated);
     }
 }
Beispiel #27
0
 public List <BusinessObjects.Models.Branch> selectBranchesByBankId(int pBankId)
 {
     try
     {
         DataAccessLayer.DALBranches.DALBranches dALBranches = new DataAccessLayer.DALBranches.DALBranches();
         return(dALBranches.selectBranchesByBankId(pBankId));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(null);
     }
 }
Beispiel #28
0
 public bool checkExist(string tableName, int id)
 {
     try
     {
         DataAccessLayer.DALCommon.DALCommon dALCommon = new DataAccessLayer.DALCommon.DALCommon();
         return(dALCommon.checkExist(tableName, id));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveExceptionToLogFile(ex);
         return(false);
     }
 }
Beispiel #29
0
 public BusinessObjects.Models.ResultsEnum updateService(BusinessObjects.Models.Service Service)
 {
     try
     {
         DataAccessLayer.DALService.DALService dALServices = new DataAccessLayer.DALService.DALService();
         return(dALServices.updateService(Service));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(BusinessObjects.Models.ResultsEnum.notUpdated);
     }
 }
Beispiel #30
0
 public BusinessObjects.Models.Service selectServiceById(int ServiceId, int bankId)
 {
     try
     {
         DataAccessLayer.DALService.DALService dALServices = new DataAccessLayer.DALService.DALService();
         return(dALServices.selectServiceById(ServiceId, bankId));
     }
     catch (Exception ex)
     {
         ExceptionsWriter.saveEventsAndExceptions(ex, "Exceptions not handled", EventLogEntryType.Error);
         return(null);
     }
 }