private bool EndLogicAlarm()
        {
            AlarmHandleGetRequest getRequest = new AlarmHandleGetRequest
            {
                Id = _alarmId
            };
            var getresponse = alarmHandleService.GetJC_AlarmHandleById(getRequest);

            if (getresponse != null && getresponse.IsSuccess && getresponse.Data != null)
            {
                JC_AlarmHandleInfo alarmHandelInfo = getresponse.Data;
                alarmHandelInfo.ExceptionReason = reasonEdit.Text;
                alarmHandelInfo.Handling        = measureEdit.Text;
                //alarmHandelInfo.EndTime = DateTime.Now;
                alarmHandelInfo.HandlingTime = DateTime.Now;
                ClientItem _ClientItem = Basic.Framework.Data.PlatRuntime.Items[KeyConst.ClientItemKey] as ClientItem;
                if (_ClientItem != null)
                {
                    alarmHandelInfo.HandlingPerson = _ClientItem.UserName;
                }

                AlarmHandleUpdateRequest updateRequest = new AlarmHandleUpdateRequest
                {
                    JC_AlarmHandleInfo = alarmHandelInfo
                };

                var updateResonse = alarmHandleService.UpdateJC_AlarmHandle(updateRequest);
                if (updateResonse != null && updateResonse.IsSuccess && updateResonse.Data != null)
                {
                    return(true);
                }
            }
            return(false);
        }
        public frmAlarmProcessDetail(int alarmType, string alarmId, string stime)
        {
            InitializeComponent();
            _alarmType         = alarmType;
            _alarmId           = alarmId;
            _stime             = stime;
            alarmRecordService = ServiceFactory.Create <IAlarmRecordService>();
            alarmHandleService = ServiceFactory.Create <IAlarmHandleService>();

            if (_alarmType == 1)
            {
                AlarmRecordGetDateIdRequest alarmgetByIdrequest = new AlarmRecordGetDateIdRequest
                {
                    Id        = _alarmId,
                    AlarmDate = _stime
                };
                var response = alarmRecordService.GetDateAlarmRecordById(alarmgetByIdrequest);
                if (response.IsSuccess && response.Data != null)
                {
                    reasonEdit.Text  = response.Data.Remark;
                    measureEdit.Text = response.Data.Cs;
                }
            }
            else if (_alarmType == 2)
            {
                AlarmHandleGetRequest getRequest = new AlarmHandleGetRequest
                {
                    Id = _alarmId
                };
                var getresponse = alarmHandleService.GetJC_AlarmHandleById(getRequest);
                if (getresponse.IsSuccess && getresponse.Data != null)
                {
                    reasonEdit.Text  = getresponse.Data.ExceptionReason;
                    measureEdit.Text = getresponse.Data.Handling;
                }
            }
        }
 public BasicResponse <JC_AlarmHandleInfo> GetJC_AlarmHandleById(AlarmHandleGetRequest jC_AlarmHandlerequest)
 {
     return(alarmHandleService.GetJC_AlarmHandleById(jC_AlarmHandlerequest));
 }