private ClientARN convertToClientARNObject(DataRow dr)
        {
            ClientARN clientARN = new ClientARN();

            clientARN.Id        = dr.Field <int>("Id");
            clientARN.Cid       = dr.Field <int>("CId");
            clientARN.ARNId     = dr.Field <int>("ARNId");
            clientARN.ARNName   = dr.Field <string>("Name");
            clientARN.ArnNumber = dr.Field <string>("ARNNumber");
            return(clientARN);
        }
        public ClientARN GetARN(int cid)
        {
            ClientARN clientARN = new ClientARN();

            DataTable dtAppConfig = DataBase.DBService.ExecuteCommand(string.Format(SELECT_ARN, cid));

            foreach (DataRow dr in dtAppConfig.Rows)
            {
                clientARN = convertToClientARNObject(dr);
            }
            return(clientARN);
        }
 public void DeleteARN(ClientARN clientARN)
 {
     try
     {
         DataBase.DBService.ExecuteCommandString(string.Format(DELETE_ARN,
                                                               clientARN.Cid));
     }
     catch (Exception ex)
     {
         StackTrace st = new StackTrace();
         StackFrame sf = st.GetFrame(0);
         MethodBase currentMethodName = sf.GetMethod();
         LogDebug(currentMethodName.Name, ex);
         throw ex;
     }
 }
        public Result Delete(ClientARN client)
        {
            var result = new Result();

            try
            {
                ClientService clientService = new ClientService();
                clientService.DeleteARN(client);
                result.IsSuccess = true;
            }
            catch (Exception exception)
            {
                result.IsSuccess     = false;
                result.ExceptionInfo = exception;
            }
            return(result);
        }