예제 #1
0
        public string DelJobFunc(string pRequest)
        {
            var rd     = new APIResponse <DelJobFuncRD>();
            var rdData = new DelJobFuncRD();
            var rp     = pRequest.DeserializeJSONTo <APIRequest <DelJobFuncRP> >();

            if (rp.Parameters == null)
            {
                throw new ArgumentException();
            }

            if (rp.Parameters != null)
            {
                rp.Parameters.Validate();
            }

            var loggingSessionInfo = Default.GetBSLoggingSession(rp.CustomerID, rp.UserID);

            try
            {
                JobFunctionBLL jobBll = new JobFunctionBLL(loggingSessionInfo);
                object[]       pIDs   = { rp.Parameters.JobFunctionID };
                jobBll.Delete(pIDs);
                rdData.IsSuccess = true;
                rd.ResultCode    = 0;
            }
            catch (Exception ex)
            {
                rd.ResultCode = 103;
                rd.Message    = ex.Message;
            }
            rd.Data = rdData;
            return(rd.ToJSON());
        }
예제 #2
0
        public string DelJobFunc(string pRequest)
        {
            var rd     = new APIResponse <DelJobFuncRD>();
            var rdData = new DelJobFuncRD();
            var rp     = pRequest.DeserializeJSONTo <APIRequest <DelJobFuncRP> >();

            if (rp.Parameters == null)
            {
                throw new ArgumentException();
            }

            if (rp.Parameters != null)
            {
                rp.Parameters.Validate();
            }

            var loggingSessionInfo = new LoggingSessionManager().CurrentSession;

            try
            {
                JobFunctionBLL jobBll   = new JobFunctionBLL(loggingSessionInfo);
                string[]       jobIdArr = rp.Parameters.JobFunctionID.Split(',');
                //object[] pIDs = { rp.Parameters.JobFunctionID };
                jobBll.Delete(jobIdArr);
                rdData.IsSuccess = true;
                rd.ResultCode    = 0;
            }
            catch (Exception ex)
            {
                rd.ResultCode = 103;
                rd.Message    = ex.Message;
            }
            rd.Data = rdData;
            return(rd.ToJSON());
        }