Exemple #1
0
 //tested
 #region delet-undelet an active request by the stock-keeper
 /// <summary>
 /// it inactivates an active record
 /// </summary>
 /// <param name="modUserId">userId, who does that</param>
 /// <param name="reqStartDate">startDate of the target equest</param>
 /// <param name="reqQuantId">strippingId of the target equest</param>
 /// <param name="reqUserId">userId, who wanted that</param>
 public void deletAnActiveRequest(string reqStartDate, int reqQuantId, int reqUserId)
 {
     modelRequestWrite = new RequestsModelWirteOut(dbci, parent);
     try
     {
         modelRequestWrite.deleteRequestTableActiveRecord(userIdOfPoerator, reqStartDate.Replace(".", "-"),
                                                          reqQuantId.ToString(), reqUserId.ToString());
     }
     catch (ErrorServiceDeleteRecord e)
     {
         throw new ErrorServiceRequests(e.Message);
     }
     catch (Exception e)
     {
         throw new ErrorServiceRequests("Ismeretlen hiba történt (ServRequ_delAct) " + e.Message);
     }
 }
        //tested
        #region delet-undelet an active request by the stock-keeper
        /// <summary>
        /// it inactivates an active record
        /// </summary>
        /// <param name="modUserId">userId, who does that</param>
        /// <param name="requId">DB identifier of the target request</param>

        /// <param name="reqUserId">userId, who wanted that</param>
        public void deletAnActiveRequest(int requId, int reqUserId)
        {
            modelRequestWrite = new RequestsModelWirteOut(dbci, parentMain);
            try
            {
                modelRequestWrite.deleteRequestTableActiveRecord(userIdOfOperator, requId.ToString(),
                                                                 reqUserId.ToString());
            }
            catch (ErrorServiceDeleteRecord e)
            {
                throw new ErrorServiceRequests(e.Message);
            }
            catch (Exception e)
            {
                throw new ErrorServiceRequests("Ismeretlen hiba történt (ServRequ_delAct) " + e.Message);
            }
        }