Exemple #1
0
        public bool SaveUserMessage(MED_USER_MESSAGES item)
        {
            bool result = dapper.Set <MED_USER_MESSAGES>().Save(item);

            dapper.SaveChanges();
            return(result);
        }
Exemple #2
0
        private void SendMsg()
        {
            MED_USER_MESSAGES msg = new MED_USER_MESSAGES();

            switch (comboBoxReciverType.SelectedText)
            {
            case "人员":
            {
                if (this.comboBoxReciver.SelectedIndex >= 0)
                {
                    msg.RECEIVE_USER_ID = userList[this.comboBoxReciver.SelectedIndex].USER_ID;
                }
                else
                {
                    return;
                }
            }
            break;

            case "科室":
            {
                if (this.comboBoxReciver.SelectedIndex >= 0)
                {
                    msg.RECEIVE_DEPT_CODE = deptList[this.comboBoxReciver.SelectedIndex].DEPT_CODE;
                }
                else
                {
                    return;
                }
            }
            break;

            case "角色":
            {
                if (this.comboBoxReciver.SelectedIndex >= 0)
                {
                    msg.RECEIVE_ROLE_ID = "";
                }
                else
                {
                    return;
                }
            }
            break;
            }
            msg.SEND_USER_ID = loginUser.USER_JOB_ID;
            msg.MEMO         = rTbMessage.Text.Trim();

            bool flag = new UserRepository().SaveUserMessage(msg).Data;

            if (flag)
            {
                btnClose_Click(null, null);
            }
        }
Exemple #3
0
        public RequestResult <bool> SaveUserMessage(MED_USER_MESSAGES item)
        {
            if (item == null)
            {
                return(Success(false));
            }

            item.CREATE_DATE = DateTime.Now;
            item.READ_STATE  = 0;
            item.MSG_ID      = Guid.NewGuid().ToString();

            bool flag = _userService.SaveUserMessage(item);

            return(Success(flag));
        }
Exemple #4
0
        public RequestResult <bool> SaveUserMessage(MED_USER_MESSAGES item)
        {
            string address = "PacuUser/SaveUserMessage";

            return(BaseRepository.PostCallApi <MED_USER_MESSAGES, bool>(address, item));
        }