public object UpdateNotification(ParamNotificationUpdate obj)
        {
            try
            {
                SchoolMainContext db = new ConcreateContext().GetContext(obj.userid, obj.password);
                if (db == null)
                {
                    return(new Results()
                    {
                        IsSuccess = false, Message = "Invalid User"
                    });
                }
                TBLNOTIFICATIONDETAIL objdetail = db.TBLNOTIFICATIONDETAILs.First(r => r.NOTIFICATIONID == obj.notificationid && r.STUDENTID == obj.studentid);

                objdetail.STATUS = obj.status;

                db.SaveChanges();

                return(new DivisionListResult()
                {
                    IsSuccess = true, Notification = "Notification Updated successfully"
                });
            }
            catch (Exception E)
            {
                return(new Results
                {
                    IsSuccess = false,
                    Message = E.Message
                });
            }
        }
        public object UpdateNotification(ParamNotificationUpdate obj)
        {
            try
            {
                TBLNOTIFICATIONDETAIL objdetail = db.TBLNOTIFICATIONDETAILs.First(r => r.NOTIFICATIONID == obj.notificationid && r.STUDENTID == obj.studentid);

                objdetail.STATUS = obj.status;

                db.SaveChanges();

                return("Notification Updated successfully");
            }
            catch (Exception E)
            {
                return(new Error()
                {
                    IsError = true,
                    Message = E.Message
                });
            }
        }
Esempio n. 3
0
        public object UpdateNotification(ParamNotificationUpdate obj)
        {
            try
            {
                SchoolMainContext     db        = new ConcreateContext().GetContext(obj.userid, obj.password);
                TBLNOTIFICATIONDETAIL objdetail = db.TBLNOTIFICATIONDETAILs.First(r => r.NOTIFICATIONID == obj.notificationid && r.STUDENTID == obj.studentid);

                objdetail.STATUS = obj.status;

                db.SaveChanges();

                return("Notification Updated successfully");
            }
            catch (Exception E)
            {
                return(new Error()
                {
                    IsError = true,
                    Message = E.Message
                });
            }
        }
Esempio n. 4
0
        public object UpdateNotification([FromBody] ParamNotificationUpdate obj)
        {
            NotificationBusiness objnote = new NotificationBusiness();

            return(objnote.UpdateNotification(obj));
        }