Exemple #1
0
        /*************************************
        *  Created by:   Tuan Tran
        *  Created on:   Feb 20, 2017
        *  Function:     GetRefLib
        *  Purpose:      GetRefLib
        *  Inputs:       refType,RefNo,RefInd,RefId,PrependNull
        *  Returns:      ControlListResponse
        *************************************/
        public async Task <IList <SelectListItem> > GetRefLib(string refType, string RefNo = null, string RefInd = null, string RefId = null, bool PrependNull = true)
        {
            Logger.Info("Invoking GetRefLib function");
            var response = new ControlListResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var userAccessDAO = scope.Resolve <IUserAccessDAO>();
                    var results       = await userAccessDAO.GetRefLib(refType, RefNo, RefInd, RefId, PrependNull);

                    response.RefLibLst = results;
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetRefLib: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response.RefLibLst);
        }
Exemple #2
0
        /*************************************
        *  Created by:   dandy boy
        *  Created on:   April 21, 2017
        *  Function:     GetFraudDropdown
        *  Purpose:      GetFraudDropdown
        *  Inputs:       ind,dropDown,showList,eventID,acctNo
        *  Returns:      List of SelectListItem
        *************************************/
        public async Task <IList <SelectListItem> > GetFraudDropdown(int ind, string dropDown, string showList, Int64?eventID, Int64?acctNo)
        {
            Logger.Info("Invoking GetFraudDropdown function");
            var response = new ControlListResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var pukalAcctDAO = scope.Resolve <IFraudOpDAO>();
                    var results      = await pukalAcctDAO.GetFraudDropdown(ind, dropDown, showList, eventID, acctNo);

                    response.RefLibLst = results;
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetFraudDropdown: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response.RefLibLst);
        }
Exemple #3
0
        /*************************************
        *  Created by:   Tuan Tran
        *  Created on:   Feb 23, 2017
        *  Function:     GetMap
        *  Purpose:      GetMap
        *  Inputs:
        *  Returns:      ControlListResponse
        *************************************/
        public async Task <IList <SelectListItem> > GetMap()
        {
            Logger.Info("Invoking GetMap function");
            var response = new ControlListResponse()
            {
                Status = ResponseStatus.Failure,
            };

            try
            {
                using (var scope = Container.BeginLifetimeScope())
                {
                    var userAccessDAO = scope.Resolve <IUserAccessDAO>();
                    var results       = await userAccessDAO.WebGetMap();

                    response.RefLibLst = results;
                }
                response.Status = ResponseStatus.Success;
            }
            catch (Exception ex)
            {
                string msg = string.Format("Error in GetMap: detail:{0}", ex.Message);
                Logger.Error(msg, ex);
                response.Status  = ResponseStatus.Exception;
                response.Message = msg;
            }
            return(response.RefLibLst);
        }