Beispiel #1
0
        public static void SendNotificationToDealer(string remarks, int userid, int productid = 0, int Packageid = 0, int type = 0, int catid = 0, int subcatid = 0, int techid = 0, string productName = "")
        {
            NotificationDal objnotify = new NotificationDal();
            var             userList  = objnotify.GetFcmByRoleId(11);

            //   var item = "f98Xq4PRiho:APA91bFhbXJen4QadYxH5iOgD31KWl4d9gNzOdwRkT3-n-fbB9RV7Ue0mFXKPiKD3YYCcXVhUtgYrDsRbZsSRdM-ems58s79aSq_ZahKmL4_z7PNXv62TJXqTqSCMb4P9fyGslwj5nWh";
            //var msg = "Add new product from Dealer";
            foreach (var item in userList)
            {
                SendNotification(item, remarks, userid, productName, productid, Packageid, type, catid, subcatid, techid);
            }
        }
Beispiel #2
0
        public List <string> GetFcmByRoleId(int roleId)
        {
            var     fcmList = new List <string>();
            DataSet ds      = _notifidal.GetFcmByRoleId(roleId);

            if (ds != null && ds.Tables[0] != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        fcmList.Add(ds.Tables[0].Rows[i]["FcmId"].ToString());
                    }
                }
            }


            return(fcmList);
        }