Esempio n. 1
0
        public string GetDepartmentPositionLink(string ticket, int departmentId, int positionId, ref string message)
        {
            try
            {
                message = "";
                if (!IsTicketValid(ticket))
                {
                    throw new Exception("票证验证失败!");
                }
                YnDepartmentPositionLinkPK ynDepartmentPositionLinkPK = new YnDepartmentPositionLinkPK();
                ynDepartmentPositionLinkPK.departmentId = departmentId;
                ynDepartmentPositionLinkPK.positionId   = positionId;

                YnDepartmentPositionLink ynDepartmentPositionLink = YnDepartmentPositionLinkService.GetInstance().Get(ynDepartmentPositionLinkPK);
                return(YnBaseClass2.Helper.ObjectHelper.Serialize(ynDepartmentPositionLink));
            }
            catch (Exception ex)
            {
                message = ex.Message;
            }
            return(null);
        }
Esempio n. 2
0
        public string GetDepartmentPositionLink(string ticket, int departmentId, int positionId, ref string message)
        {
            try
            {
                message = "";
                if (!IsTicketValid(ticket))
                    throw new Exception("票证验证失败!");
                YnDepartmentPositionLinkPK ynDepartmentPositionLinkPK = new YnDepartmentPositionLinkPK();
                ynDepartmentPositionLinkPK.departmentId = departmentId;
                ynDepartmentPositionLinkPK.positionId = positionId;

                YnDepartmentPositionLink ynDepartmentPositionLink = YnDepartmentPositionLinkService.GetInstance().Get(ynDepartmentPositionLinkPK);
                return YnBaseClass2.Helper.ObjectHelper.Serialize(ynDepartmentPositionLink);
            }
            catch (Exception ex)
            {
                message = ex.Message;
            }
            return null;
        }