Пример #1
0
        public int UpdateGroupStatus(int Group_Id, int Status)
        {
            int            result         = 0;
            BL_NoticeBoard ObjGroupStatus = new BL_NoticeBoard();

            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            result = ObjGroupStatus.UpdateGroupStatus(Group_Id, Status);
            return(result);
        }
Пример #2
0
        public int UpdateGroupDetails(string UserCodes, string GroupName, int Group_Id)
        {
            int            result      = 0;
            BL_NoticeBoard ObjGroupDet = new BL_NoticeBoard();

            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            string UserName = objCurInfo.GetUserName();

            result = ObjGroupDet.UpdateGroupDetails(UserCodes, GroupName, Group_Id, UserName);
            return(result);
        }
Пример #3
0
        public int InsertNewGroup(string UserCodes, string GroupName)
        {
            int result = 0;

            BL_NoticeBoard ObjNewGroup = new BL_NoticeBoard();

            DataControl.CurrentInfo objCurInfo = new DataControl.CurrentInfo();
            string UserName   = objCurInfo.GetUserName();
            string RegionCode = objCurInfo.GetRegionCode();

            result = ObjNewGroup.InsertNewGroup(UserCodes, GroupName, UserName, RegionCode);
            return(result);
        }
Пример #4
0
        public string GetActiveNoticeforInactiveUser()
        {
            StringBuilder strList = new StringBuilder();
            List <NoticeContentforUserModel> lstInactiveUserforActivenotice = new List <NoticeContentforUserModel>();

            _ObjNoticeBoard = new BL_NoticeBoard();
            lstInactiveUserforActivenotice = _ObjNoticeBoard.GetActiveNoticeforInactiveUser(_objCurrent.GetCompanyCode()).ToList();
            if (lstInactiveUserforActivenotice != null && lstInactiveUserforActivenotice.Count > 0)
            {
                foreach (var inactiveUser in lstInactiveUserforActivenotice)
                {
                    strList.Append("<div class='dvDisableUser' onclick='fnDisableUserClick(\"" + inactiveUser.User_Code + "\");$(this).addClass(\"selectNode\");' >" + inactiveUser.User_Name + "</div>");
                }
            }

            return(strList.ToString());
        }
Пример #5
0
        public string GetNoticeContent(string userCode)
        {
            StringBuilder strTbl = new StringBuilder();

            _ObjNoticeBoard = new BL_NoticeBoard();
            List <NoticeContentforUserModel> lstNoticecontent = new List <NoticeContentforUserModel>();

            lstNoticecontent = _ObjNoticeBoard.GetNoticeContent(_objCurrent.GetCompanyCode(), userCode).ToList();
            int s = 0;

            strTbl.Append("<table class='table table-striped' id='tblNoticecontent'>");
            strTbl.Append("<thead class='active'>");
            strTbl.Append("<tr>");
            strTbl.Append("<th></th><th>Tile</th><th>Active From</th><th>Active To</th><th>Author</th>");
            strTbl.Append("</tr>");
            strTbl.Append("</thead>");
            strTbl.Append("<tbody>");
            if (lstNoticecontent != null && lstNoticecontent.Count > 0)
            {
                foreach (var notice in lstNoticecontent)
                {
                    strTbl.Append("<tr>");
                    strTbl.Append("<td>");
                    //activityLockString.Append("<input name='chkUserSelect' class='checkboxclass' type='checkbox'  id='chk_" + index.ToString() + "' name='checkbox'>");
                    strTbl.Append("<input type='checkbox' id='chk_" + s + "' name='chkselect'  value='" + notice.Msg_Code + "'>");
                    strTbl.Append("</td>");
                    strTbl.Append("<td>" + notice.Title + "</td>");
                    strTbl.Append("<td>" + notice.Date_From + "</td>");
                    strTbl.Append("<td>" + notice.Date_To + "</td>");
                    strTbl.Append("<td>" + notice.User_Name + "</td>");
                    strTbl.Append("<input type='hidden' id='hdnUserNotice_" + s + "' value='" + notice.User_Code + "$" + notice.Msg_Code + "'/>");
                    strTbl.Append("</tr>");
                    s++;
                }
            }
            else
            {
                strTbl.Append("<tr><td colspan='4' style='text-align:center;'>No Notice Found</td></tr>");
            }
            strTbl.Append("</tbody>");
            strTbl.Append("</table>");
            return(strTbl.ToString());
        }
Пример #6
0
        public string UpdateNoticetoActiveUser(string AsignuserCode, string MessageCodes, string userCode)
        {
            string[] messageCodesarr = MessageCodes.Split('^');
            _ObjNoticeBoard = new BL_NoticeBoard();
            List <NoticeContentforUserModel> lstNotices = new List <NoticeContentforUserModel>();
            string message = string.Empty;
            int    result  = 0;

            if (messageCodesarr.Length > 0)
            {
                foreach (string messageCode in messageCodesarr)
                {
                    if (!string.IsNullOrEmpty(messageCode))
                    {
                        NoticeContentforUserModel _objNotice = new NoticeContentforUserModel();
                        _objNotice.Msg_Code = messageCode;
                        lstNotices.Add(_objNotice);
                    }
                }
                lstNotices.ForEach
                (
                    s => s.Company_Code = _objCurrent.GetCompanyCode()
                );
                lstNotices.ForEach
                (
                    s => s.Asigned_User_Code = AsignuserCode
                );
                lstNotices.ForEach
                (
                    s => s.User_Code = userCode
                );
            }
            result = _ObjNoticeBoard.UpdateActiveNoticeforInactiveuser(lstNotices);
            if (result > 0)
            {
                message = "Notice Asigned correctly";
            }
            return(message);
        }