public async Task <IActionResult> assigned_activityList([FromBody] newNotificationActivityLisModel model)
        {
            TranStatus transaction = new TranStatus();
            Dictionary <String, Object> dctData = new Dictionary <string, object>();
            HttpStatusCode statusCode           = HttpStatusCode.OK;

            try
            {
                var activityList = await iactivity.assigned_activityList(model);

                dctData.Add("assigned_activityList", activityList);
            }
            catch (Exception ex)
            {
                transaction = CommonHelper.TransactionErrorHandler(ex);
                statusCode  = HttpStatusCode.BadRequest;
            }
            dctData.Add("Status", transaction);
            return(this.StatusCode(Convert.ToInt32(statusCode), dctData));
        }
Esempio n. 2
0
 // Count Assigned list on bell  notification
 public async Task <List <newNotificationActivityLisModel> > assigned_activityList(newNotificationActivityLisModel model)
 {
     using (activityRepository = new ActivityRepository())
     {
         return(await activityRepository.assigned_activityList(model));
     }
 }
        // Count Assigned list on bell  notification
        public async Task <List <newNotificationActivityLisModel> > assigned_activityList(newNotificationActivityLisModel model)
        {
            using (var connection = new SqlConnection(ConnectionString))
            {
                connection.Open();
                TranStatus        transaction = new TranStatus();
                DynamicParameters parameter   = new DynamicParameters();
                parameter.Add("@SalesID", model.userId);

                var result = await connection.QueryAsync <newNotificationActivityLisModel>("assigned_activityList", parameter, commandType : CommandType.StoredProcedure);

                return(result.ToList());
            }
        }